CO2 in the air
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.
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.
This lesson is inspired by
https://circuitdigest.com/microcontroller-projects/interfacing-mq135-gas-sensor-with-arduino-to-measure-co2-levels-in-ppm
and https://pslab.io/blog/measuring-co2-with-mq135/
https://www.hackster.io/sheekar/mq-135-sensor-co2-benzyne-with-arduino-sheekar-banerjee-ab6ccd
https://circuitdigest.com/microcontroller-projects/interfacing-mq135-gas-sensor-with-arduino-to-measure-co2-levels-in-ppm
and https://pslab.io/blog/measuring-co2-with-mq135/
https://www.hackster.io/sheekar/mq-135-sensor-co2-benzyne-with-arduino-sheekar-banerjee-ab6ccd