Code: Select all
import pulseio
import board
print("starting")
pulse1 = pulseio.PulseIn(board.IO33)
while True:
if pulse1.paused == True:
pulse1.resume()
if len(pulse1) > 0:
print(list(pulse1))
pulse1.clear()
Moderators: adafruit_support_bill, adafruit
Code: Select all
import pulseio
import board
print("starting")
pulse1 = pulseio.PulseIn(board.IO33)
while True:
if pulse1.paused == True:
pulse1.resume()
if len(pulse1) > 0:
print(list(pulse1))
pulse1.clear()
Code: Select all
board.D5
Code: Select all
import board, pulseio
p = pulseio.PulseIn(board.D12)
print(p.paused)
while True:
if len(p) >0:
print(p[0])
p.clear()