forked from M-Labs/nac3
Sebastien Bourdeauducq
3b10172810
Currently crashes the compiler with: thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', nac3core/src/codegen/expr.rs:395:58
27 lines
468 B
Python
27 lines
468 B
Python
from min_artiq import *
|
|
from numpy import int32, int64
|
|
|
|
|
|
@kernel
|
|
class Demo:
|
|
core: Core
|
|
led: TTLOut
|
|
|
|
def __init__(self):
|
|
self.core = Core()
|
|
self.led = TTLOut(0)
|
|
|
|
@kernel
|
|
def main_kernel(self):
|
|
self.core.reset()
|
|
while True:
|
|
self.led.pulse_mu(int64(100000000))
|
|
delay_mu(int64(100000000))
|
|
|
|
def run(self):
|
|
self.core.run(self.main_kernel)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
Demo().run()
|