forked from M-Labs/nac3
nac3artiq: include parallel in demo
This commit is contained in:
parent
e8228710e7
commit
610448fa73
|
@ -3,17 +3,21 @@ from min_artiq import *
|
||||||
@kernel
|
@kernel
|
||||||
class Demo:
|
class Demo:
|
||||||
core: Core
|
core: Core
|
||||||
led: TTLOut
|
led0: TTLOut
|
||||||
|
led1: TTLOut
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.core = Core()
|
self.core = Core()
|
||||||
self.led = TTLOut(self.core, 19)
|
self.led0 = TTLOut(self.core, 18)
|
||||||
|
self.led1 = TTLOut(self.core, 19)
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run_k(self):
|
def run_k(self):
|
||||||
self.core.reset()
|
self.core.reset()
|
||||||
while True:
|
while True:
|
||||||
self.led.pulse(100.*ms)
|
with parallel:
|
||||||
|
self.led0.pulse(100.*ms)
|
||||||
|
self.led1.pulse(100.*ms)
|
||||||
self.core.delay(100.*ms)
|
self.core.delay(100.*ms)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Reference in New Issue