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

Moderator: igrr

User avatar
By carlhesp
#19699 Hey Guys
I am working on a fridge temperature controller to control the fermentation temp of home brew beer.

Here is my sketch currently http://pastebin.com/NrT74pkB
theres not much too it, pretty much the basic web example and ive put in my controller webpage.
Using an ESP-01.

If I uncomment line 133 it crashes out on the first iteration of the for loop. If I remove the loop and print out each index manually (1 - 3) it prints out fine.

Output looks like this when crashing.

Code: Select all...

Connected to ACHome

IP address: 192.168.1.59

MDNS responder started

HTTP server started

1:

 ets Jan  8 2013,rst cause:4, boot mode:(1,6)



wdt reset


What I am actually doing is trying to find the index numbers for the temperature and then replace those with the actual temperature form the sensor. By changing the start and end index numbers of the for loop i am able to print out different snippets of code.
I could probably just convert the whole page to a single line and just use a text editor to find the character position but I want to know why this is crashing.

Thanks
User avatar
By cal
#19701 Moin,

useful projects need support! :)

It's a watchdog reset. You are blocking the main loop for too long.
It looks like the loop started printing already so I would start with watchdog feed in the loop.
Dunno how to do it in arduino.

Hope that helps,
Cal
User avatar
By carlhesp
#19713 Weird thing is this doesn't activate the watch dog timer.

Code: Select allvoid loop(void){
  //readTemp();
  server.handleClient();
  Serial.println(index_html[1581]);
  Serial.println(index_html[1582]);
  Serial.println(index_html[1583]);
  Serial.println(index_html[1584]);
}
User avatar
By cal
#19721 Moin,

oh, i overlooked the print problem.
You are not printing the integer value of i in the loop but the character code having a value of i.
That needs some printf or itoa conversion in standard c. I don't know what the idiomatic arduino
way is for this but shoul be pretty easy to find.

Cal