arduino:sds011
Nova PM sensor SDS011 High precision laser pm2.5 air quality detection sensor module Super dust dust sensors, digital output
- dust sensor
- PM2.5
- PM10
https://nettigo.pl/attachments/398
import serial import matplotlib.pyplot as plt s = serial.Serial(port='COM5',baudrate=9600) plt.figure() plt.grid() plt.title('particale concentration in my room'); i=0 while True: res = s.read(size=10) a = int.from_bytes(res[2:3], byteorder='big', signed=False) b = int.from_bytes(res[4:5], byteorder='big', signed=False) print("{},{}".format(a,b)) plt.scatter(i, a, c='r') plt.scatter(i, b, c='b') plt.legend([r'PM10 $\mu g \/ \slash m^{3}$', r'PM2.5 $\mu g \/ \slash m^{3}$']) plt.pause(0.05) i+=1 s.close()
arduino/sds011.txt · Last modified: by aistis



