examples/blink_forever: port to NAC3

This commit is contained in:
Sebastien Bourdeauducq 2021-11-10 13:59:59 +08:00
parent 2f031285a4
commit 262cd62544

View File

@ -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)