-->
Page 2 of 3

Re: ESP8266 ESP-12E/Arduino needs a 20hr Delay

PostPosted: Wed Jun 07, 2017 1:15 pm
by johnnyfrx
Sorry about that...those values were used in the myDelay variable which was called by the delay.
I just wanted to show what else I had tried as far as integer types.

Re: ESP8266 ESP-12E/Arduino needs a 20hr Delay

PostPosted: Wed Jun 07, 2017 1:24 pm
by martinayotte
The delay function is pretty straight-forward with argument in miliseconds :
Code: Select allvoid delay(unsigned long);

So, the following will delay for 24hrs :
Code: Select alldelay(86400000);

Re: ESP8266 ESP-12E/Arduino needs a 20hr Delay

PostPosted: Wed Jun 07, 2017 4:02 pm
by johnnyfrx
Alright...I am going to try it again as you've shown me here. Will keep you posted. Thank you very much for your guidance and input...not just on this issue but on the many others I have seen you post to, which have helped me along my ESP8266 Journey many times!

Re: ESP8266 ESP-12E/Arduino needs a 20hr Delay

PostPosted: Fri Jun 09, 2017 7:29 am
by johnnyfrx
I tested this SIMPLE code on the ESP12 and it never lit up even after a 2 hour delay.
I changed out power sources, etc... no help.
I also tested it on one of my trusty Arduino UNO's and all worked fine for 2 hour delay, and 8 hour delay.
Any ideas?

Code: Select allvoid setup() {

  pinMode(3, OUTPUT);

}


void loop() {
  digitalWrite(3, HIGH);   
  delay(3000);                     
  digitalWrite(3, LOW);   
  delay(3000);
  digitalWrite(3, HIGH);   
  delay(3000);
  digitalWrite(3, LOW);   
  delay(7200000);      //2 Hour Delay
  //delay(28800000);    //8 Hour Delay
  digitalWrite(3, HIGH);   
  delay(1000);                       
  digitalWrite(3, LOW);   
  delay(1000);
  digitalWrite(3, HIGH);   
  delay(1000);
  digitalWrite(3, LOW);   
  delay(1000);
  digitalWrite(3, HIGH);   
  delay(1000);
    digitalWrite(3, LOW);   
  delay(1000);
 
}