forked from M-Labs/artiq
examples/blink_forever: port to NAC3
This commit is contained in:
parent
2f031285a4
commit
262cd62544
@ -1,7 +1,12 @@
|
||||
from artiq.experiment import *
|
||||
from artiq.coredevice.core import Core
|
||||
from artiq.coredevice.ttl import TTLOut
|
||||
|
||||
|
||||
@nac3
|
||||
class BlinkForever(EnvExperiment):
|
||||
core: KernelInvariant[Core]
|
||||
led: KernelInvariant[TTLOut]
|
||||
|
||||
def build(self):
|
||||
self.setattr_device("core")
|
||||
self.setattr_device("led")
|
||||
@ -10,5 +15,5 @@ class BlinkForever(EnvExperiment):
|
||||
def run(self):
|
||||
self.core.reset()
|
||||
while True:
|
||||
self.led.pulse(100*ms)
|
||||
delay(100*ms)
|
||||
self.led.pulse(100.*ms)
|
||||
self.core.delay(100.*ms)
|
||||
|
Loading…
Reference in New Issue
Block a user