Skip to content

use rainbowio for colorwheel #81

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

Merged
merged 2 commits into from
Oct 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions examples/seesaw_rotary_neopixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@

"""I2C rotary encoder NeoPixel color picker and brightness setting example."""
import board
from rainbowio import colorwheel
from adafruit_seesaw import seesaw, neopixel, rotaryio, digitalio

try:
import _pixelbuf
except ImportError:
import adafruit_pypixelbuf as _pixelbuf

# For use with the STEMMA connector on QT Py RP2040
# import busio
Expand Down Expand Up @@ -42,7 +39,7 @@
else:
color -= 1 # Advance backward through the colorwheel.
color = (color + 256) % 256 # wrap around to 0-256
pixel.fill(_pixelbuf.colorwheel(color))
pixel.fill(colorwheel(color))

else: # If the button is pressed...
# ...change the brightness.
Expand Down