]>
vault307.fbx.one Git - LEDstrand.git/blob - main2.py
2 from machine
import Pin
3 from neopixel
import NeoPixel
11 cBtn
=Pin(16,Pin
.IN
,Pin
.PULL_UP
)
12 sBtn
=Pin(17,Pin
.IN
,Pin
.PULL_UP
)
14 # Define the strand pin number and number of LEDs from variables
15 strand
= NeoPixel(Pin(GPIOnumber
), LEDcount
)
20 # Turn off all LEDs before program start
21 strand
.fill((mycolour
))
26 i
=random
.randint(0,LEDcount
-1)
36 mycolour
=(random
.randint(0,255),random
.randint(0,255),random
.randint(0,255))