diff --git a/README.md b/README.md index 2688574..8602f28 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -Questo e il file di test \ No newline at end of file +usa nix-shell rshell per upload file con `cp main.py /pyboard` +per invece usare lo shell di micropython nix-shell minicom diff --git a/main.py b/main.py new file mode 100644 index 0000000..a209aa8 --- /dev/null +++ b/main.py @@ -0,0 +1,10 @@ +from machine import Pin, Timer + +led = Pin("LED", Pin.OUT) +tim = Timer() +def tick(timer): + global led + led.toggle() + +tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick) +