nac3/nac3artiq/demo/demo.py

30 lines
715 B
Python
Raw Normal View History

from min_artiq import *
2024-12-27 17:44:11 +08:00
import string_attribute_issue337
import support_class_attr_issue102
@nac3
class Demo:
core: KernelInvariant[Core]
led0: KernelInvariant[TTLOut]
led1: KernelInvariant[TTLOut]
2021-09-25 14:17:11 +08:00
def __init__(self):
self.core = Core()
2021-11-05 18:07:18 +08:00
self.led0 = TTLOut(self.core, 18)
self.led1 = TTLOut(self.core, 19)
2020-12-18 23:44:45 +08:00
@kernel
def run(self):
self.core.reset()
2024-12-27 17:44:11 +08:00
string_attribute_issue337.Demo2().run()
support_class_attr_issue102.Demo3().run()
2021-09-25 14:17:11 +08:00
while True:
2021-11-05 18:07:18 +08:00
with parallel:
self.led0.pulse(100.*ms)
self.led1.pulse(100.*ms)
self.core.delay(100.*ms)
2020-12-18 23:44:45 +08:00
if __name__ == "__main__":
Demo().run()