Open
Description
The following code should work.
import time
import board
from adafruit_seesaw import seesaw, digitalio
ss = seesaw.Seesaw(board.I2C())
button = digitalio.DigitalIO(ss, 0)
button.switch_to_input(pull=ss.INPUT_PULLUP)
while True:
print(button.value)
time.sleep(0.2)
However, it does not. The pin is left floating. The following code, does work.
import time
import board
import digitalio
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.digitalio import DigitalIO
ss = Seesaw(board.I2C())
button = DigitalIO(ss, 0)
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.UP
while True:
print(button.value)
time.sleep(0.2)
Presumably the first example is supposed to work like the second example, but it does not. I have no suggestions on where to start with fixing this.