add "blink forever" example

This is useful for quickly demonstrating the idle kernel.
This commit is contained in:
Sebastien Bourdeauducq 2015-10-31 23:17:29 +08:00
parent 0a36b03a12
commit 592663a649
1 changed files with 13 additions and 0 deletions

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