Skip to content

Commit aadb8ac

Browse files
committed
Merge branch 'main' of github.com:ladyada/Adafruit_CircuitPython_seesaw
2 parents 2310a9b + da9a46c commit aadb8ac

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

adafruit_seesaw/seesaw.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ def __init__(self, i2c_bus, addr=0x49, drdy=None, reset=True):
169169
from adafruit_seesaw.robohat import MM1_Pinmap
170170

171171
self.pin_mapping = MM1_Pinmap
172-
elif (pid in (_5690_PID, _5681_PID, _5743_PID)) or (self.chip_id in (_ATTINY817_HW_ID_CODE, _ATTINY807_HW_ID_CODE, _ATTINY1617_HW_ID_CODE)):
172+
elif (pid in (_5690_PID, _5681_PID, _5743_PID)) or (self.chip_id in
173+
(_ATTINY817_HW_ID_CODE,
174+
_ATTINY807_HW_ID_CODE,
175+
_ATTINY1617_HW_ID_CODE)):
173176
from adafruit_seesaw.attinyx16 import ATtinyx16_Pinmap
174177

175178
self.pin_mapping = ATtinyx16_Pinmap

examples/seesaw_quadrotary.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import adafruit_seesaw.neopixel
1010
import adafruit_seesaw.rotaryio
1111
import adafruit_seesaw.digitalio
12-
import time
1312

1413
# For use with the STEMMA connector on QT Py RP2040
1514
import busio
@@ -39,7 +38,7 @@
3938
continue
4039
for n, rotary_pos in enumerate(positions):
4140
if rotary_pos != last_positions[n]:
42-
print("Rotary #%d: %d" % (n, rotary_pos))
41+
print(f"Rotary #{n}: {rotary_pos}")
4342
last_positions[n] = rotary_pos
4443

4544
if switches[n].value: # Change the LED color if switch is not pressed
@@ -51,6 +50,6 @@
5150

5251
# if switch is pressed, light up white, otherwise use the stored color
5352
if not switches[n].value:
54-
pixels[n] = 0xFFFFFF
53+
pixels[n] = 0xFFFFFF
5554
else:
56-
pixels[n] = colorwheel(colors[n])
55+
pixels[n] = colorwheel(colors[n])

0 commit comments

Comments
 (0)