Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
makermelissa opened this issue Nov 5, 2019 · 0 comments · Fixed by #10
Closed

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

makermelissa opened this issue Nov 5, 2019 · 0 comments · Fixed by #10

Comments

@makermelissa
Copy link
Collaborator

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant