First I connected my sensor to the microcontroller I had drawn earlier in the week 6- Eletronic Design
VCC(co2 sensor) -5V (microcontroller)
GND (co2 sensor) -GND (microcontroller)
AnalogPin (co2 sensor) - analog Pin (microcontroller)
Note that in order to calibrate the sensor, it should take about 1 hour to warm up to obtain reliable data.
Then I had a problem. I had already tested the mq135 sensor on an Arduino and saw that it is able to read the CO2 values of the air.
However when trying to send the same arduino code to my microcontroller Attiny44 I realized that the library "MQ135.h" is not compatible with Attiny 44.
This forced me to rethink the code and make my own conversion from analog read values to ppm values, based on the library code "MQ135.h".
So after some time, I managed to make the code work. The final code is this:
mq135.txt _Arduino File
Since on my microcontroller with Attiny 44 it is not possible to open the serial monitor to confirm the data jammed by my co2 sensor, to calibrate and confirm the ppm values emitted by my co2 sensor, I connected the sensor to an arduino and sends I read the code I wrote and read the values on the serial monitor, as shown in the video.
My MQ135 sensor is calibrated and ready to use :)