adafruit / adafruit/Adafruit_CircuitPython_PM25

RuntimeError: Invalid PM2.5 header

Open
#24 24 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
31
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Following this guide https://learn.adafruit.com/pm25-air-quality-sensor/python-and-circuitpython with minor adjustments I keep running into this error...
"Traceback (most recent call last):
File "code.py", line 190, in
File "/lib/adafruit_pm25/__init__.py", line 83, in read
RuntimeError: Invalid PM2.5 header"

I am using a Teensy4.1 instead of the Feather to control the WiFi Module, Temp sensor, and PM25 Sensor. I am using the UART connection method. What will happen is it will run for a random amount of time, sometimes 5 hours, sometimes 30 minutes before running into this error. I'm unsure how to fix the problem without just looping a reset but that does not solve the problem.

Thanks,
W

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with code.py around line 190 and lib/adafruit_pm25/__init__.py around line 83, then compare the UART setup with the linked PM2.5 guide and the Teensy4.1 configuration. Reproduce the intermittent failure over time and identify why the PM2.5 header becomes invalid; done means the sensor can run without this RuntimeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.