forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Firmware
Adafruit CircuitPython 7.0.0-alpha.3-452-g8a5a7457a on 2021-06-29; Raspberry Pi Pico with rp2040Code/REPL
import board
import digitalio
import pulseio
import time
#GP0 to GP1; GP2 grounded
print("start")
digitalOut = digitalio.DigitalInOut(board.GP0)
digitalOut.direction = digitalio.Direction.OUTPUT
time.sleep(5)
print("creating PulseIns")
pulsesIn1 = pulseio.PulseIn(board.GP1, maxlen=20)
pulsesIn2 = pulseio.PulseIn(board.GP2, maxlen=20)
time.sleep(3)
print("high")
digitalOut.value = True
while True:
print(".", end="")
time.sleep(1)Behavior
After "high", the USB connection is dropped. If I comment out the pulsesIn2 line, it prints the dots as expected.