2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-04 17:31:10 +08:00
artiq/examples/master/repository/blink_forever.py
Sebastien Bourdeauducq 592663a649 add "blink forever" example
This is useful for quickly demonstrating the idle kernel.
2015-10-31 23:17:29 +08:00

14 lines
262 B
Python

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)