Skip to content

Commit

Permalink
Merge pull request #81 from FoamyGuy/use_rainbowio
Browse files Browse the repository at this point in the history
use rainbowio for colorwheel
  • Loading branch information
kattni committed Oct 7, 2021
2 parents 2eb9fc0 + 4d82c83 commit b9259da
Showing 1 changed file with 2 additions and 5 deletions.
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

0 comments on commit b9259da

Please sign in to comment.