adafruit / Adafruit_CircuitPython_WS2801

Driver for WS2801 RGB pixels
MIT License
22 stars 13 forks source link

Value returned is backwards of what it was set to #9

Closed makermelissa closed 5 years ago

makermelissa commented 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):

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)