forked from M-Labs/nac3
30 lines
715 B
Python
30 lines
715 B
Python
from min_artiq import *
|
|
import string_attribute_issue337
|
|
import support_class_attr_issue102
|
|
|
|
@nac3
|
|
class Demo:
|
|
core: KernelInvariant[Core]
|
|
led0: KernelInvariant[TTLOut]
|
|
led1: KernelInvariant[TTLOut]
|
|
|
|
def __init__(self):
|
|
self.core = Core()
|
|
self.led0 = TTLOut(self.core, 18)
|
|
self.led1 = TTLOut(self.core, 19)
|
|
|
|
@kernel
|
|
def run(self):
|
|
self.core.reset()
|
|
string_attribute_issue337.Demo2().run()
|
|
support_class_attr_issue102.Demo3().run()
|
|
while True:
|
|
with parallel:
|
|
self.led0.pulse(100.*ms)
|
|
self.led1.pulse(100.*ms)
|
|
self.core.delay(100.*ms)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
Demo().run()
|