[newbie]addressing the RGB leds on the respeaker2

info about ReSpeaker series products

Moderators: lily.li, violet, salmanfarisvp, seth.welday

Post Reply
hugocoolens
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Sun Jan 27, 2019 9:50 pm

[newbie]addressing the RGB leds on the respeaker2

Post by hugocoolens » Sun Jan 27, 2019 10:09 pm

I'm trying to address the RGB leds on the respeaker2 (sitting on a rpi3) from within python:
When trying out the code below I get one led lighting up blue, but I can't figure out how to switch it off. Can someone here help me further?

import spidev
import time
spi = spidev.SpiDev()
spi.open(0,1) #open device 1 on bus 0
resp = spi.xfer([0x00, 0x00, 0x00, 0x00])
time.sleep(0.1)
resp = spi.xfer([0xFF, 0xFF, 0x00, 0x00])

kind regards,
hugo

Post Reply