Hello! I'm currently working on an air quality monitoring system that makes use of multiple analog sensors such as MQ135 and MQ131. However, my ESP8266 only has one analog pin, so I made use of ADS1115 as an analog extender. The main problem is, I can't seem to figure out how ADS1115 is used in such a way that the sensors will give off calibrated readings from the library.
It seems that the library is assuming that the reading comes from the sensor that is connected to the main board, and not the ADS1115. Can you please help? Here's my code
which library ?
does the serial monitor display sensor readings? upload a copy of the serial monitor output
if you do a web search for arduino MQ135 you will get plenty of links
avoid posting screen shots of serial monitor output - copy the text and post that
the serial monitor output in post 3 does not look as though it comes from the program of post 1?
post your latest code?
do the temperature and humidity reading displayed in post 3 look realistic? they seem high?
do the readings change as temperature etc change?
Your code is not doing anything with the Adc values. They look like just the raw adc values, so you have to convert the digital readings to voltages. Then based on your sensors you have to convert the voltage values to measurement values.
Are you powering the ADS from 5volt, and have an I2C level converter,
or do you power the ADS from 3.3volt, in which case Gain(0) is wrong.
How do you power the MQ sensors.
They draw 150mA each, and must be powered with 5volt ± 0.1volt for a stable readout.
USB to power the ESP and two sensors might not be good enough.
Connection diagram please.
Leo..