CircuitPython version
Adafruit CircuitPython 7.0.0-alpha.6-103-gf9f106b58 on 2021-08-20; Cytron Maker Pi RP2040 with rp2040
Code/REPL
import board
import digitalio
import time
button = digitalio.DigitalInOut(board.GP20)
button.direction = digitalio.Direction.INPUT
led = digitalio.DigitalInOut(board.GP0)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = not button.value
print(button.value)
#time.sleep(0.1)
Behavior
The function print(button.value) doesn't print out the GPIO state correctly if I commented out the time.sleep(0.1).
It works fine if the 0.1s delay is there.
In both cases, the LED does react correctly to the button's state.
Description
No response
Additional information
No response
CircuitPython version
Code/REPL
Behavior
The function print(button.value) doesn't print out the GPIO state correctly if I commented out the time.sleep(0.1).
It works fine if the 0.1s delay is there.
In both cases, the LED does react correctly to the button's state.
Description
No response
Additional information
No response