Chat freely about anything...

User avatar
By WStan
#23051 Result:
Code: Select allwork time before handleClient[s]= 31.00
work time after handleClient[s]= 31.00
work time before handleClient[s]= 31.00
work time after handleClient[s]= 31.00
work time before handleClient[s]= 31.00
work time after handleClient[s]= 31.00
work time before handleClient[s]= 31.00
work time after handleClient[s]= 31.00
work time before handleClient[s]= 31.00
work time after handleClient[s]= 31.00
work time before handleClient[s]= 31.01
work time after handleClient[s]= 31.01
work time before handleClient[s]= 31.01
work time after handleClient[s]= 31.02
work time before handleClient[s]= 31.02
work time after handleClient[s]= 31.03
work time before handleClient[s]= 31.03
work time after handleClient[s]= 31.03
work time before handleClient[s]= 31.03
work time after handleClient[s]= 31.03
work time before handleClient[s]= 31.04
work time after handleClient[s]= 31.04
work time before handleClient[s]= 31.05
work time after handleClient[s]= 31.05
work time before handleClient[s]= 31.06
work time after handleClient[s]= 31.06
work time before handleClient[s]= 31.06
work time after handleClient[s]= 31.07
work time before handleClient[s]= 31.07
work time after handleClient[s]= 31.08
work time before handleClient[s]= 31.08
work time after handleClient[s]= 31.08
work time before handleClient[s]= 31.08
work time after handleClient[s]= 31.08
work time before handleClient[s]= 31.09
work time after handleClient[s]= 31.09
work time before handleClient[s]= 31.10
work time after handleClient[s]= 31.10
work time before handleClient[s]= 31.10
work time after handleClient[s]= 31.11
work time before handleClient[s]= 31.11
work time after handleClient[s]= 31.12
work time before handleClient[s]= 31.12
work time after handleClient[s]= 31.12
work time before handleClient[s]= 31.13
work time after handleClient[s]= 31.13
work time before handleClient[s]= 31.14
work time after handleClient[s]= 31.14
work time before handleClient[s]= 31.14
work time after handleClient[s]= 31.14
work time before handleClient[s]= 31.14
work time after handleClient[s]= 31.15
work time before handleClient[s]= 31.15
work time after handleClient[s]= 31.16
work time before handleClient[s]= 31.16
work time after handleClient[s]= 31.16
work time before handleClient[s]= 31.17
work time after handleClient[s]= 31.17
work time before handleClient[s]= 31.18
work time after handleClient[s]= 31.18
work time before handleClient[s]= 31.19
work time after handleClient[s]= 31.19
work time before handleClient[s]= 31.19
work time after handleClient[s]= 31.19
work time before handleClient[s]= 31.19
work time after handleClient[s]= 31.20
work time before handleClient[s]= 31.20
work time after handleClient[s]= 31.20
work time before handleClient[s]= 31.21
work time after handleClient[s]= 31.21
work time before handleClient[s]= 31.22
work time after handleClient[s]= 31.22
work time before handleClient[s]= 31.23
work time after handleClient[s]= 31.23
work time before handleClient[s]= 31.23
work time after handleClient[s]= 31.24
work time before handleClient[s]= 31.24
work time after handleClient[s]= 31.25
work time before handleClient[s]= 31.25
work time after handleClient[s]= 31.25
work time before handleClient[s]= 31.25
work time after handleClient[s]= 31.25
work time before handleClient[s]= 31.26
work time after handleClient[s]= 31.26
work time before handleClient[s]= 31.27
work time after handleClient[s]= 31.27
work time before handleClient[s]= 31.27
work time after handleClient[s]= 31.28
work time before handleClient[s]= 31.28
work time after handleClient[s]= 31.29
work time before handleClient[s]= 31.29
work time after handleClient[s]= 31.29
work time before handleClient[s]= 31.30
work time after handleClient[s]= 31.30
work time before handleClient[s]= 31.30
work time after handleClient[s]= 31.30
work time before handleClient[s]= 31.31
work time after handleClient[s]= 31.31
work time before handleClient[s]= 31.31
work time after handleClient[s]= 31.32
work time before handleClient[s]= 31.32
work time after handleClient[s]= 31.33
work time before handleClient[s]= 31.33
work time after handleClient[s]= 31.33
work time before handleClient[s]= 31.34
work time after handleClient[s]= 31.34
work time before handleClient[s]= 31.35
work time after handleClient[s]= 31.35
work time before handleClient[s]= 31.35
work time after handleClient[s]= 31.35
work time before handleClient[s]= 31.35
work time after handleClient[s]= 31.36
work time before handleClient[s]= 31.36
work time after handleClient[s]= 31.37
work time before handleClient[s]= 31.37
work time after handleClient[s]= 31.38
work time before handleClient[s]= 31.38
work time after handleClient[s]= 31.38
work time before handleClient[s]= 31.39
work time after handleClient[s]= 31.39
work time before handleClient[s]= 31.40
work time after handleClient[s]= 31.40
work time before handleClient[s]= 31.40
work time after handleClient[s]= 31.41
work time before handleClient[s]= 31.41
work time after handleClient[s]= 31.41
work time before handleClient[s]= 31.41
work time after handleClient[s]= 31.42
work time before handleClient[s]= 31.42
work time afte
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 28780, room 16
tail 12
chksum 0xef
ho 0 tail 12 room 4
load 0x3ffe8000, len 1548, room 12
tail 0
chksum 0x90
load 0x3ffe8610, len 3080, room 8
tail 0
chksum 0x22
csum 0x22
r?
..
Connected to @HomeCA72
IP address: 192.168.1.102
MDNS responder started
HTTP server started


From following loop
Code: Select allvoid loop(void){
  unsigned int ms=millis();
  float sec=float (ms)/1000;
  if (sec>31)
  {
  Serial.print("work time before handleClient[s]= ");
  Serial.println(sec);
  }
  //---------------------
  server.handleClient();
  //---------------------
  ms=millis();
  sec=float (ms)/1000;
  if (sec>31)
  {
  Serial.print("work time after handleClient[s]= ");
  Serial.println(sec);
  }
//  digitalWrite(led, 1);   
//  delay(1);               
//  digitalWrite(led, 0);   
//  delay(1);
}
User avatar
By WStan
#23083 Suddenly, at 23.30 both my ESP8266 units had already begun to work normally
First:
on http://192.168.1.103/ shows:
hello from esp8266!
and in serial:
Code: Select allwork time [s]= 1226.49
work time [s]= 1226.59
work time [s]= 1226.69
work time [s]= 1226.80
work time [s]= 1226.90
work time [s]= 1226.99
work time [s]= 1227.09
work time [s]= 1227.19
work time [s]= 1227.30
work time [s]= 1227.40
work time [s]= 1227.50
work time [s]= 1227.60
work time [s]= 1227.70
work time [s]= 1227.80
work time [s]= 1227.90
work time [s]= 1228.00
work time [s]= 1228.10

an so on

Second module as termometer with DS18S20
on http://192.168.1.102/ shows:
ESP8266 12750 T=21.30 Time:1280s

After resetting the routers working time is again about 32 seconds
What is going on?
Last edited by WStan on Mon Jul 13, 2015 2:30 am, edited 1 time in total.
User avatar
By kolban
#23096 Do you have a link to the millis() function documentation for the function of the Arduino libraries implemented to top of the ESP8266? Here is what is going through my mind.

Your code seems to be writing out the millis() value divided by 1000 to turn it into seconds. Perfect ... get that ... however ... what are "expecting" the millis() output to be? My belief is that the value is a timer that keeps incrementing since boot time. Which means (to me) that it should always be increasing and if one wants to find delta times, one must record the initial value and then subtract that from the current value to find the difference.

Again, I might be totally off base on this having never tried to use (yet) the Arduino IDE/libraries (I code using the raw Espressif SDK and Eclipse).