1 import time
2 import grovepi
3
4 # Connect first LED in Chainable RGB LED chain
5 # In: CI,DI,VCC,GND
6 # Out: CO,DO,VCC,GND
7 pin = 7
8
9 # I have 10 LEDs connected in series with the f
10 # First LED input socket connected to GrovePi, o
11 numleds = 1
12
13 grovepi.pinMode(pin,"OUTPUT")
14 time.sleep(1)
15
16 # Chainable RGB LED methods
17 # grovepi.storeColor(red, green, blue)
18 # grovepi.chainableRgbLed_init(pin, numLeds)
19 # grovepi.chainableRgbLed_test(pin, numLeds, tes
20 # grovepi.chainableRgbLed_pattern(pin, pattern,
21 # grovepi.chainableRgbLed_modulo(pin, offset, d
22 # grovepi.chainableRgbLed_setLevel(pin, level, r
23
24 # test colors used in grovepi.chainableRgbLed_te
25 testColorBlack = 0 # 0b000 #000000
26 testColorBlue = 1 # 0b001 #0000FF