From 1d781add1fd3a8d5f1cacc71a16112d9de3da92f Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 16 Aug 2021 10:47:06 -0500 Subject: [PATCH 1/2] use rainbowio for colorwheel --- examples/seesaw_rotary_neopixel.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/seesaw_rotary_neopixel.py b/examples/seesaw_rotary_neopixel.py index b36d51b..6dde5fc 100644 --- a/examples/seesaw_rotary_neopixel.py +++ b/examples/seesaw_rotary_neopixel.py @@ -3,12 +3,10 @@ """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 @@ -42,7 +40,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. From 4d82c8343659dfbbdb28d87148b1e7dbdf34f299 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 16 Aug 2021 10:51:58 -0500 Subject: [PATCH 2/2] run pre-commit --- examples/seesaw_rotary_neopixel.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/seesaw_rotary_neopixel.py b/examples/seesaw_rotary_neopixel.py index 6dde5fc..62e47bd 100644 --- a/examples/seesaw_rotary_neopixel.py +++ b/examples/seesaw_rotary_neopixel.py @@ -7,7 +7,6 @@ from adafruit_seesaw import seesaw, neopixel, rotaryio, digitalio - # For use with the STEMMA connector on QT Py RP2040 # import busio # i2c = busio.I2C(board.SCL1, board.SDA1)