We solved this on github: https://github.com/kevinkk525/pms5003_m ... n/issues/4
Apparently the adafruit sensor he bought didn't respond well to the passive mode but works fine in active mode. Since I bought mine from Aliexpress, I can't comment/test any further.
PMS5003 air quality sensor library
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: PMS5003 air quality sensor library
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
-
- Posts: 4
- Joined: Fri May 14, 2021 2:07 pm
Re: PMS5003 air quality sensor library
Thank you to everyone posting in this thread. It has been very helpful.
I am having a problem with this sensor putting it to sleep using the SET pin to turn the sensor off.
Has anyone managed to get this to work with an ESP32 Devkit DOIT?
I have been using the following code but cannot get the sensor to sleep when toggling the pin on/off:
I am having a problem with this sensor putting it to sleep using the SET pin to turn the sensor off.
Has anyone managed to get this to work with an ESP32 Devkit DOIT?
I have been using the following code but cannot get the sensor to sleep when toggling the pin on/off:
Code: Select all
from machine import Pin
p0 = Pin(14, Pin.OUT)
while 1:
p0(0)
time.sleep(5)
p0(1)
time.sleep(5)
-
- Posts: 4
- Joined: Fri May 14, 2021 2:07 pm
Re: PMS5003 air quality sensor library
(UPDATE) - Changed to pin 23 as previous pin I discovered is input only!
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: PMS5003 air quality sensor library
Glad you found the problem!
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode