nac3artiq: include parallel in demo

This commit is contained in:
Sebastien Bourdeauducq 2021-11-05 18:07:18 +08:00
parent e8228710e7
commit 610448fa73

View File

@ -3,17 +3,21 @@ from min_artiq import *
@kernel
class Demo:
core: Core
led: TTLOut
led0: TTLOut
led1: TTLOut
def __init__(self):
self.core = Core()
self.led = TTLOut(self.core, 19)
self.led0 = TTLOut(self.core, 18)
self.led1 = TTLOut(self.core, 19)
@kernel
def run_k(self):
self.core.reset()
while True:
self.led.pulse(100.*ms)
with parallel:
self.led0.pulse(100.*ms)
self.led1.pulse(100.*ms)
self.core.delay(100.*ms)
def run(self):