From b9104e58a33bed4a481ef0f83000d993ced9fb9a Mon Sep 17 00:00:00 2001 From: Numb-0 Date: Wed, 25 Mar 2026 11:00:51 +0100 Subject: [PATCH] added main.py and some informations --- README.md | 3 ++- main.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 main.py 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) +