CircuitPython version
Adafruit CircuitPython 7.2.0-alpha.1-364-g2bf5a1ee4 on 2022-02-09; Raspberry Pi Zero W with bcm2835
Code/REPL
import board
from digitalio import DigitalInOut, Direction, Pull
import time
# switch
switch = DigitalInOut(board.D19)
# if I don't do this, it won't pull the input up
#switch.direction = Direction.OUTPUT
#switch.value = True
switch.direction = Direction.INPUT
switch.pull = Pull.UP
while True:
print(switch.value)
time.sleep(0.5)
Behavior
Level on D19 stays at 0V when open regardless of Pull.UP. switch.value stays False regardless of the state of the input.
If the level is first set as output, and manually set to a true value, then it stays up after reverting to input, and I can read the state.
Description
No response
Additional information
No response
CircuitPython version
Code/REPL
Behavior
Level on D19 stays at 0V when open regardless of Pull.UP.
switch.valuestaysFalseregardless of the state of the input.If the level is first set as output, and manually set to a true value, then it stays up after reverting to input, and I can read the state.
Description
No response
Additional information
No response