This commit is contained in:
2026-06-16 13:02:06 +02:00
commit 9e45f1f199
29 changed files with 2531 additions and 0 deletions

29
Maker_Pico_Box/rainbow.py Normal file
View File

@@ -0,0 +1,29 @@
import machine
import neopixel
import time
# GP28 pin and number of LEDs
pin = 28
num_leds = 8 # change to how many LEDs you have
np = neopixel.NeoPixel(machine.Pin(pin), num_leds)
# Simple color helper
def set_color(r, g, b):
for i in range(num_leds):
np[i] = (r, g, b)
np.write()
# Demo loop
while True:
set_color(255, 0, 0) # Red
time.sleep(1)
set_color(0, 255, 0) # Green
time.sleep(1)
set_color(0, 0, 255) # Blue
time.sleep(1)
set_color(0, 0, 0) # Off
time.sleep(1)