mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
add "blink forever" example
This is useful for quickly demonstrating the idle kernel.
This commit is contained in:
parent
0a36b03a12
commit
592663a649
13
examples/master/repository/blink_forever.py
Normal file
13
examples/master/repository/blink_forever.py
Normal file
@ -0,0 +1,13 @@
|
||||
from artiq import *
|
||||
|
||||
|
||||
class BlinkForever(EnvExperiment):
|
||||
def build(self):
|
||||
self.setattr_device("core")
|
||||
self.setattr_device("led")
|
||||
|
||||
@kernel
|
||||
def run(self):
|
||||
while True:
|
||||
self.led.pulse(100*ms)
|
||||
delay(100*ms)
|
Loading…
Reference in New Issue
Block a user