1
0
forked from M-Labs/nac3
nac3/nac3artiq/demo.py

25 lines
422 B
Python
Raw Normal View History

from min_artiq import *
2021-09-24 11:39:26 +08:00
2021-09-24 14:45:44 +08:00
@kernel
class Demo:
core: Core
led: TTLOut
2021-09-25 14:17:11 +08:00
def __init__(self):
self.core = Core()
self.led = TTLOut(self.core, 19)
2020-12-18 23:44:45 +08:00
@kernel
def run_k(self):
self.core.reset()
2021-09-25 14:17:11 +08:00
while True:
self.led.pulse(100.*ms)
self.core.delay(100.*ms)
2020-12-18 23:44:45 +08:00
def run(self):
self.core.run(self.run_k)
2021-10-09 15:52:45 +08:00
2020-12-18 23:44:45 +08:00
if __name__ == "__main__":
Demo().run()