Closed makermelissa closed 5 years ago
When getting a value from an LED, the value returned is in reverse of what it was set to. For example in this code snippet we initialize the LEDs and set leds[0] to (255, 0, 0):
leds[0]
import board import adafruit_ws2801 odata = board.D5 oclock = board.D6 numleds = 25 bright = 1.0 leds = adafruit_ws2801.WS2801(oclock, odata, numleds, brightness=bright, auto_write=True) leds[0] = (255, 0, 0)
Now if we try and retrieve it, we get (0, 0, 255)
print(leds[0]) # Returns (0, 0, 255)
When getting a value from an LED, the value returned is in reverse of what it was set to. For example in this code snippet we initialize the LEDs and set
leds[0]
to (255, 0, 0):Now if we try and retrieve it, we get (0, 0, 255)