7/23/22, 9:41 PM
Grove - Chainable RGB LED - Seeed Wiki
https://wiki.seeedstudio.com/Grove-Chainable_RGB_LED/
17/29
314
315
316
"Test 4f) Set using modulo - every 3,
317
318
# change color to magenta
319
grovepi
.storeColor(
255
,
0
,
255
)
320
time
.sleep(.
5
)
321
322
# set every 4nd led to magenta
323
grovepi
.chainableRgbLed_modulo(pin,
2
,
3
)
324
time
.sleep(.
5
)
325
326
# pause so you can see what happened
327
time
.sleep(
2
)
328
329
# reset (all off)
330
grovepi
.chainableRgbLed_test(pin, numleds, t
331
time
.sleep(.
5
)
332
333
334
"Test 5a) Set level 6"
335
336
# change color to green
337
grovepi
.storeColor(
0
,
255
,
0
)
338
time
.sleep(.
5
)
339
340
# set leds 1-6 to green
341
grovepi
.write_i
2
c_block(
0
x
04
,[
95
,pin,
6
,
0
])
342
time
.sleep(.
5
)
343
344
# pause so you can see what happened
345
time
.sleep(
2
)
346
347
# reset (all off)
348
grovepi
.chainableRgbLed_test(pin, numleds, t
349
time
.sleep(.
5
)
350
351
352
"Test 5b) Set level 7 - reverse"
353
354
# change color to red