-
Notifications
You must be signed in to change notification settings - Fork 1.3k
any limitation pulseio.PulseIn maxlen and pulse length on M5Stack Atom ? #7352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like there is an IDF ringbuffer that we may not be pulling from fast enough:
|
The maximum ir signal I'm using is 222 pulses. Panasonic air conditioner. |
Correction of information Adafruit CircuitPython 8.0.0-beta.0 on 2022-08-18; Raspberry Pi Pico with rp2040pulses sum: 249428 pulse count: 439 Max: 10480 |
They all use the code I cited. |
I tested on an ESP32-S2 and was able to get a max pulsein reading of 65262. It was an accurate reading, based on measurements by a logic analyzer. I will see if I can get a M5Stack Atom to test with. |
Tested the example code with an ESP32 ( Adafruit Feather HUZZAH32) and was able to consistently handle pulses = 65535. However, when pulses exceeded 65535 it looks like the esp32 is returning about the high pulse width - 65535 (i.e. a pulse of 90000 returned 23000). It looks like we are wrapping around at some point. |
I will check new version. |
I changed Circuitpython version as below. Max pulse length 65535usec. Works for what I use. |
I want a wifi function for analyzing the ir remote signal of the air conditioner, so I'm considering introducing a raspberry pi pico w. |
@musimasami Does the fix work to fix your #7352 issue? |
I will close this issue. |
CircuitPython version
Code/REPL
Behavior
M5Stack Atom
pulse count: 128 Max: 9140usec
PCA10059
pulse count: 167 Max: 65535usec
Description
I tested IR Remote signal recieveing both PCA10059 and M5Stack Atom Lite.
M5Stack Atom Lite can't detect long pulse.
Show same signal result below. (83 pulses) + (65535usec space) + (83 pulses)
Adafruit CircuitPython 8.0.0-beta.0 on 2022-08-18; PCA10059 nRF52840 Dongle with nRF52840
import adafruit_irremote
import pulseio
decoder = adafruit_irremote.GenericDecode()
pulsein = pulseio.PulseIn(board.P0_31, maxlen=600, idle_state=True)
pulses = decoder.read_pulses(pulsein,max_pulse=91000,pulse_window=0.104,blocking_delay=0.102)
Set maximum pulse length 91000usec.
pulses sum: 174568 pulse count: 167 Max: 65535usec
pulses:
[3489, 1722, 459, 440, 433, 439, 433, 1285, 460, 1287, 457, 440, 433, 1285, 459, 440, 433, 439, 432, 441, 432, 1286, 458, 441, 432, 440, 433, 1285, 459, 441, 432, 1286, 459, 440, 433, 1285, 458, 441, 433, 439, 432, 1286, 459, 441, 431, 440, 433, 440, 432, 440, 432, 1287, 458, 1287, 458, 440, 433, 440, 432, 1287, 457, 1286, 459, 440, 433, 440, 432, 440, 432, 1287, 458, 440, 432, 1287, 458, 1286, 458, 1287, 459, 440, 432, 440, 433, 65535, 3476, 1722, 460, 439, 433, 440, 433, 1285, 459, 1286, 458, 440, 434, 1284, 459, 440, 433, 440, 432, 441, 433, 1285, 458, 441, 433, 439, 432, 1288, 457, 440, 432, 1287, 458, 440, 433, 1287, 457, 440, 433, 439, 433, 1287, 458, 440, 433, 439, 432, 441, 432, 440, 433, 1286, 458, 1286, 459, 440, 433, 439, 433, 1287, 457, 1286, 459, 440, 432, 441, 432, 440, 432, 1286, 458, 441, 432, 1286, 460, 1285, 459, 1285, 459, 440, 433, 440, 432]
Adafruit CircuitPython 8.0.0-beta.5 on 2022-12-08; M5Stack Atom Lite with ESP32
import adafruit_irremote
import pulseio
decoder = adafruit_irremote.GenericDecode()
pulsein = pulseio.PulseIn(board.D32, maxlen=600, idle_state=True)
pulses = decoder.read_pulses(pulsein,max_pulse=91000,pulse_window=0.104,blocking_delay=0.102)
pulses sum: 94214 pulse count: 128 Max: 9140usec
pulses:
[3513, 1713, 465, 408, 465, 411, 462, 1278, 468, 1278, 465, 411, 462, 1278, 468, 408, 462, 411, 462, 408, 465, 1278, 468, 408, 465, 432, 438, 1281, 465, 432, 441, 1278, 465, 435, 438, 1278, 468, 432, 441, 432, 438, 1278, 468, 405, 465, 435, 438, 435, 435, 438, 438, 1278, 468, 1275, 468, 435, 438, 432, 441, 1278, 465, 1278, 468, 405, 468, 432, 441, 405, 465, 1278, 468, 432, 441, 1275, 468, 1278, 468, 1275, 468, 408, 465, 432, 441, 9140, 3510, 1716, 468, 432, 441, 432, 435, 1281, 465, 1281, 465, 408, 465, 1278, 465, 423, 453, 405, 465, 411, 462, 1278, 465, 411, 462, 411, 462, 1278, 465, 408, 465, 1278, 465, 411, 462, 1281, 465, 411, 462, 408, 462, 1281, 465, 411]
Additional information
No response
The text was updated successfully, but these errors were encountered: