]>
vault307.fbx.one Git - LEDstrand.git/blob - main1.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
)
19 # Turn off all LEDs before program start
20 strand
.fill((mycolour
))
25 i
=random
.randint(0,LEDcount
-1)
35 mycolour
=(random
.randint(0,255),random
.randint(0,255),random
.randint(0,255))