Farbwechselcode für THONNY und raspi
This commit is contained in:
parent
abdaf00559
commit
14e1cc98f0
1 changed files with 43 additions and 0 deletions
43
RaspiPico/wechselnde_farben.py
Normal file
43
RaspiPico/wechselnde_farben.py
Normal file
|
@ -0,0 +1,43 @@
|
|||
import machine
|
||||
import neopixel
|
||||
import time
|
||||
|
||||
np = neopixel.NeoPixel(machine.Pin(0), 24)
|
||||
|
||||
for i in range(9999999999999999999):
|
||||
for i in range(24):
|
||||
np[i % 24] = (0, 0, 255)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (123, 0, 255)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (255, 0, 255)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (255, 0, 75)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (255, 0, 0)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (255, 75, 0)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (255, 255, 0)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (0, 255, 0)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
||||
for i in range(24):
|
||||
np[i % 24] = (0, 255, 255)
|
||||
np.write()
|
||||
time.sleep(0.01)
|
Loading…
Add table
Add a link
Reference in a new issue