adafruit / Adafruit_CircuitPython_PM25

CircuitPython library for PM2.5 sensors
MIT License
28 stars 16 forks source link

Library fails on reading the Adafruit PMSA003I #11

Closed MuazSalah closed 3 years ago

MuazSalah commented 3 years ago

The setup I tested on is: HW: balenaFin v1.1 OS: Raspbian GNU/Linux 9 (stretch) SW: Python 3.5.3

The provided example code was failing with:

Traceback (most recent call last):
  File "/home/pi/Desktop/pm25_new/pm25_recreate.py", line 41, in <module>
    pm25 = adafruit_pm25.PM25_I2C(i2c, reset_pin)
  File "/usr/local/lib/python3.5/dist-packages/adafruit_pm25.py", line 145, in __init__
    raise RuntimeError("Unable to find PM2.5 device")
RuntimeError: Unable to find PM2.5 device

The working modified library is here: adafruit_pm25.py.txt

ladyada commented 3 years ago

hi your changes are completely different I2C API and we wouldn't accept them.