-
Notifications
You must be signed in to change notification settings - Fork 101
Cosmetic fixes, updated rainbow_cycle #33
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
Conversation
General comment as this applies to the entire file. This example was written before the ability to define pixel order in the constructor was added. See issue #1 and pr #24. Using |
I totally forgot about that. You're right. |
Yep. Like that. Now that
For 2., here's maybe a way to change def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if pos < 0 or pos > 255:
r = g = b = 0
elif pos < 85:
r = int(pos * 3)
g = int(255 - pos*3)
b = 0
elif pos < 170:
pos -= 85
r = int(255 - pos*3)
g = 0
b = int(pos*3)
else:
pos -= 170
r = 0
g = int(pos*3)
b = int(255 - pos*3)
return (r, g, b) if ORDER == neopixel.RGB or ORDER == neopixel.GRB else (r, g, b, 0) |
That's the thing that caught my eye in the first place. I'll try to work in this suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Much better!
Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel to 3.3.2 from 3.3.1: > Merge pull request adafruit/Adafruit_CircuitPython_NeoPixel#33 from kattni/example-update
No description provided.