adafruit / adafruit/Adafruit_CircuitPython_PM25
HEX printing to Console?
- Dominant language
- Python
- Stars
- 31
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
I'm running a BME680, PM25, and SCD41X, however i believe its the PM25 thats writing to console. (total guess).
I start my sensor script, which does a read from each of the sensors and I see all this being printed to console.
Is this something I inadvertantly turned on or is this a bug in the software somewhere?
Also hitting the checksum problem intermittently.
I'm unable to see anything that could explain the behavior.
Thanks,
```
$1D => ['0xa0', '0x0', '0x4c', '0xd4', '0xa0', '0x7b', '0xf2', '0x70', '0x4c', '0x35', '0x80', '0x0', '0x0', '0xac', '0xf5', '0x0', '0x4']
$08 <= []
$8C <= []
$02 <= []
$10 <= []
$74 => ['0x8c']
$8D <= []
```
The code looks like the following:
```python
def getPM25Data(self, t=datetime.now().strftime("%m/%d/%Y, %H:%M:%S")):
try:
aqdata = self.pm25.read()
# Prepare the data row
pm25_data = {
"pm10_std": aqdata["pm10 standard"],
"pm25_std": aqdata["pm25 standard"],
"pm100_std": aqdata["pm100 standard"],
"pm10_env": aqdata["pm10 env"],
"pm25_env": aqdata["pm25 env"],
"pm100_env": aqdata["pm100 env"],
"part_gt_03um": aqdata["particles 03um"],
"part_gt_05um": aqdata["particles 05um"],
"part_gt_10um": aqdata["particles 10um"],
"part_gt_25um": aqdata["particles 25um"],
"part_gt_50um": aqdata["particles 50um"],
"part_gt_100um": aqdata["particles 100um"]
}
return pm25_data
except Exception as e:
logger.error(f"Unable to read from PM25 sensor")
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the pm25.read() call in the supplied getPM25Data function and reproduce the console output with the PM25 sensor connected. Trace the library's read and checksum handling to identify whether the HEX lines are intentional diagnostics or an error; done means the source of the output and intermittent checksum failures are identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100