What it is: The PMS5003 is a laser particulate sensor that counts fine dust in the air and reports PM1.0, PM2.5 and PM10 in micrograms per cubic metre — the same numbers used in official air-quality indexes.
How it works: A small fan pulls air past a laser; scattered light is counted and converted to particle mass. It streams data frames over a 3.3V UART at 9600 baud. You only need to read from it, so the sensor's TX goes to the ESP32's RX.
Wiring (UART — note the crossover; uses the 5-pin/G-series cable):
PMS5003 TX -> GPIO20 (ESP32 RX)
PMS5003 RX -> GPIO21 (ESP32 TX)
PMS5003 VCC -> 5V (the fan + laser need 5V)
PMS5003 GND -> GND
OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5
Libraries: "PMS Library" by Mariusz Kacki (Markusz), plus "Adafruit SSD1306" and "Adafruit GFX Library".
On screen / Serial: PM1.0, PM2.5 and PM10 in µg/m³. Light a match nearby (then blow it out) to see PM2.5 spike.
Gotchas: Logic is 3.3V so no shifter needed, but it must have 5V power for the fan. Give it ~30 seconds after power-on for the fan to stabilise. The frame reader can miss a packet occasionally; the sketch simply waits for the next one.