CO2 Sensor Senseair S8 - big values read
-
Hi,
I installed a Senseair S8 senzor on a Raspberry Pi 4. In the first week it worked ok (values coming close to 400 ppm when I open the window) then it started to show big values, especially when I open the window, values like 65429 ppm. The reading interval is 15 seconds. I use this code to get the value from the sensor. Any idea what could be the problem?
ser = serial.Serial("/dev/serial0",baudrate =9600,timeout = .5) ser.flushInput() time.sleep(1) ser.flushInput() ser.write(b"\xFE\x44\x00\x08\x02\x9F\x25") time.sleep(.5) resp = ser.read(7) high = resp[3] low = resp[4] co2 = (high*256) + low
Thanks!
-
Welcome to the forum @wasssu
Best way to find out is probably to log the contents of the resp variable.
-
maybe check what they did here:
https://github.com/airgradienthq/arduino/blob/master/AirGradient.cpp