Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By FreddyVictor
#58928
Sammy888 wrote: I tried changing the voltage supply to the sensor to 3.3V from the Arduino and changed the code to 3.3/1024. The values now just fluctuate around 2.00 even though the sensor's not triggered. Is there other codes needed. Like does it has anything to do with the I2C concept (I dont really know what is it yet) or something about slave/master of the arduino board and ESP8266 board? Do advice, thanks.


What do you mean by "sensor's not triggered" ?
What sensor are you using ?
The ESP8266 raw ADC input is 1.0v, however, on ESP12 modules there are voltage step-down resistors which scale 3.3v -> 1.0v so voltage applied to A0 should be 0->3.3v for it to work correctly
User avatar
By schufti
#58937 on ESP8266-01 there is no analog input availlable to (comon) user unless you solder extra wire to the chip directly. And to read it, you have to use pin A0
e.g. sensorValue = analogRead(A0)
there is no voltage divider on EPS-12.
NodeMCU boards (though based on ESP-12) do have a divider.