From 94c3c871c5e753f769e9712bd52d11cfe7c13327 Mon Sep 17 00:00:00 2001 From: baidarka Date: Sat, 9 Dec 2023 19:03:53 +0100 Subject: [PATCH] daily cycle --- README.md | 23 ++++++++++++----------- slag-in-de-rondte.py | 4 +++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 22a1e20..d7e3fb3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ E.g. Thonny or VSCode. For lookenspeepers, build this project and watschen der Blinkenlichten! -- Wire up your RaspberryPi Pico according to the Fritzing diagram. +- Wire up your RaspberryPi Pico according to the Fritzing diagram +- Optionally remove the resistor on GPIO2 to use an 8 minutes day/night cycle - Save the script 'slag-in-de-rondte.py' to your Pico as 'main.py' - Restart your Pico @@ -78,16 +79,16 @@ A hollow pipe tool (Dutch: holpijp) is only needed if you want to punch holes in ![Hollow pipe tool](/img/holpijp.png) -| pin | pin name | in/out | description | -| --- | --- | --- | --- | -| 3 | GND | | ground | -| 4 | GPIO 2 | in | (future use) | -| 21 | GPIO 16 | out 3.3V | LED Texel | -| 22 | GPIO 17 | out 3.3V | LED Vlieland | -| 24 | GPIO 18 | out 3.3V | LED Terschelling | -| 25 | GPIO 19 | out 3.3V | LED Ameland | -| 26 | GPIO 20 | out 3.3V | LED Schiermonnikoog | -| 39 | VSYS | 5V | LED Red + Green Harlingen | +| pin | pin name | in/out | description | +| --- | --- | --- | --- | +| 3 | GND | | ground | +| 4 | GPIO 2 | in | disables night and day cycle | +| 21 | GPIO 16 | out 3.3V | LED Texel | +| 22 | GPIO 17 | out 3.3V | LED Vlieland | +| 24 | GPIO 18 | out 3.3V | LED Terschelling | +| 25 | GPIO 19 | out 3.3V | LED Ameland | +| 26 | GPIO 20 | out 3.3V | LED Schiermonnikoog | +| 39 | VSYS | 5V | LED Red + Green Harlingen | CAUTION: Drawing too much power from the board may damage the board. diff --git a/slag-in-de-rondte.py b/slag-in-de-rondte.py index 472283a..e3be4cd 100644 --- a/slag-in-de-rondte.py +++ b/slag-in-de-rondte.py @@ -27,7 +27,9 @@ ameland = PWM(Pin(19), f) schiermonnikoog = PWM(Pin(20), f) -# Optionally, run without day&night cycle +# Optionally, run without night_n_day cycle +# - pin not grounded = night and day cycle of 8 minutes +# - pin grounded = continuously use LEDs night_n_day = Pin(2, Pin.IN, Pin.PULL_UP) # Coroutine: Flash a LED, once