Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Kasper Jepsen
#19208 Hi,

I have made a code example from the SDK and compiled on windows, which reads a temp/hym. sensor and sends it to the internet.
It did work for a long time running on battery, then i added the ADC and measured the batt voltage, now the upload stops after short time ~ some hours.
I have set the upload time to 15min between and goes into deep sleep.
Normally it wakes correct, and also before the ADC was added.

Anyone there has a clue?
I recall the SDK to be 1.0.0 or 1.0.5.

I am litle unsure if i have to update the module itself when i flash directly from eclipse, will it then update the firmware in the module?
And also what is the difference in the different flash option ~ Flash file ~ Flash all etc.?

BR
Kasper
User avatar
By GeorgeIoak
#19233 The ADC can only handle up to 1V input so you need a voltage divider on your measured signal to make the maximum input 1V.

There is also a command to read the Vcc voltage level so you could be using that instead of trying to directly read the battery level.
User avatar
By twaymouth
#19274 I am doing something similar and uploading temperature, battery voltage and supply voltage to thingspeak. In order for the ESP to read the analog values I found that they had to be taken before WiFi was connected otherwise the ESP would force reboot or get stuck in a boot loop. For my application simply taking the readings in the first lines of code before WiFi had connected was enough to make it stable.