Post topics, source code that relate to the Arduino Platform

User avatar
By Alan-bc
#85904 I need to set a bit every minute or 2 or 5 or 15. I need to leave it set until a specific A2D value is read, then clear the bit and go back to waiting.

Rookie Arduino programmer though I am, I've written code that does this, and it works.

Here's the problem. Different units need different delays AND different A2D values.

Normally, a switch and a pot allow such configuration with ease BUT these units are going into a HARSH environment. Pots go out of adjustment and switch contacts corrode.

Option 1 is to build 60 different units (6 delays and 10 A2D settings). This is nuts, for a whole lot of reasons.

Option 2 is to use an ESP8266 as a web server, create a web page with radio buttons for the various possibilities and store the results in "eeprom".

This I've also done.

What I can't seem to do is put these two together. In my

void loop(void)

the other code never gets executed.

I am ALMOST ready to have the ESP8266 send a message to ANOTHER microcontroller and let the other micro do all work, but this just seems nuts.

Any thoughts or suggestions gratefully appreciated.

User avatar
By JurajA
#85906 the ADC of the esp8266 is used not only for the analog pin but for the measuring of WiFi power too. Hard use of analogRead disturbs the WiFi power measuring.