7/23/22, 9:41 PM
Grove - Chainable RGB LED - Seeed Wiki
https://wiki.seeedstudio.com/Grove-Chainable_RGB_LED/
18/29
Notice that there's something you have to concern of:
Also all methods you can see in grovepi.py is:
5.Run the demo.
355
grovepi
.storeColor(
255
,
0
,
0
)
356
time
.sleep(.
5
)
357
358
# set leds 4-10 to red
359
grovepi
.write_i
2
c_block(
0
x
04
,[
95
,pin,
7
,
1
])
360
time
.sleep(.
5
)
361
362
363
except
KeyboardInterrupt:
364
# reset (all off)
365
grovepi
.chainableRgbLed_test(pin, numleds, t
366
break
367
except
IOError:
368
"Error"
1
pin
=
7
#setting up the output pin
2
numleds
=
1
#how many leds you plug
1
storeColor
(red, green, blue)
2
chainableRgbLed_init
(pin, numLeds)
3
chainableRgbLed_test
(pin, numLeds, testColor)
4
chainableRgbLed_pattern
(pin, pattern, whichLed)
5
chainableRgbLed_modulo
(pin, offset, divisor)
6
chainableRgbLed_setLevel
(pin, level, reverse)
sudo
python
3
grove_chainable_rgb_led.py