The Earth’s Atmospheric CO2 level is increasing year over year. Monitoring CO2 in the atmosphere isn't the only important place to measure it. Monitoring it in a room or when breathing is also important in a healthcare setting.
Wiring Diagram
For the first CO2 activity, we are only using the A0 signal pin. Let's wire it up.
The Base Code
We will start simple and not calibrate it. We will just take its preprocessed output data and display it to the serial monitor. Type up and upload this code after you wire up your sensor to the board. After you upload it, open up the serial monitor.
It should have outputs like this.
Did it work? If it did, save your code.
Outputting Readings to OLED
Wire up the OLED with the gas sensor. Below is how to wire that if you forgot. Change the code to below and see if you can get the readings from the sensor to get sent to the OLED.
The Wiring. 1) GND to GND 2) VCC to 5 V 3) SCL to pin A5 4) SDA to pin A4