I have a gas sensor that I am trying to read. I have connected the sensor to the analog input of ESP-S2 TFT Feather. When I change the analog to digital and read the measured voltage, the measured voltage is very very high. I figured out the resolution of this board is 13 bit. But, the measured voltage is still very high.
int analogInPin = A2;
void readco() {
// read the analog in value:
sensorValue = 0;
const int res = 8191; //resolution = 13-bit and 2^13 - 1 = 8191
sensorValue = analogRead(analogInPin) + sensorValue;
iaq_data.co_0=(float) sensorValue*3.3/res;
analogReadResolution().