How to use PROGMEM to store and serve web pages
Posted: Fri Aug 21, 2015 4:39 pm
There is a way to store a web page in an arduino program and recall it without making the ESP8266 to crash?
served with
when i call "/servepage" the ESP resets with
Which if i remember correctly is due to the watchdog timer.
Code: Select all
const char PAGE_NetworkConfiguration[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<head>
</head>
<body>
hello!
</body>
</html>
)=====";
served with
Code: Select all
else if (req.indexOf("/servepage") != -1){
for(int i = 0; i < 10;i++){
client.println(PAGE_NetworkConfiguration[i]);
}
}
when i call "/servepage" the ESP resets with
Code: Select all
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
Which if i remember correctly is due to the watchdog timer.