Read PMS5003 sensor and display results on a 0.66 inch OLED.
In particular this example uses the WEMOS OLED shield, and the esp8266-oled-ssd1306 library.
# install the libraries (one time setup)
platformio lib install "thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays"
Note This is a 3.3V board, and the PMS5003 requires 5V.
- SoftwareSerial on pins gpio2/D4 (RX) and gpio0/D3 (TX).
- OLED shield is on pins gpio4/D3 (SDA) and gpio5/D5 (SCL).
# compile
platformio run -e d1_mini
# upload
platformio run -e d1_mini -t upload
# open serial monitor
platformio run -e d1_mini -t monitor
Note This is a 3.3V board, and the PMS5003 requires 5V. You need provide 5V for the fan to operate properly.
- Serial2 on pins gpio16 (RX) and gpio17 (TX).
- OLED shield is on pins gpio21 (SDA) and gpio22 (SCL).
# compile
platformio run -e esp32minikit
# upload
platformio run -e esp32minikit -t upload
# open serial monitor
platformio run -e esp32minikit -t monitor