circuitpython: pulseio.PulseIn does not work on FeatherS3

CircuitPython version

Adafruit CircuitPython 8.0.4 on 2023-03-15; FeatherS3 with ESP32S3

Code/REPL

import board, pulseio

p = pulseio.PulseIn(board.D12) # physical pin 10
while True:
    if len(p) > 0:
        print(p[0])
        p.clear()

Behavior

No output.

Description

Connected a RC receiver outputting PWM (3.3 volt output, I checked w/ scope).

The same code does output a series of numbers on a Raspi Pico.

Also discussed here: https://forums.adafruit.com/viewtopic.php?p=966813

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20

Most upvoted comments

I’m not sure why, but this script shows all the incoming pulse values, not just the last 2:

import board, pulseio
p = pulseio.PulseIn(board.IO12,maxlen=600, idle_state=True)
print(p.paused)
while True:
    if len(p) >0:
        x = []
        for i in range(len(p)):
            x.append(p[i])
        print(x)
        p.clear()

The only differences are the addition of maxlen and idle_state on the PulseIn init line.