Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By voyager
#23732 Hi folny82,
tried your code and get following errors:
ESP_WebConfig_Master.ino: In lambda function:
ESP_WebConfig_Master:163: error: 'stopAll' is not a member of 'WiFiUDP'
ESP_WebConfig_Master:165: error: 'class EspClass' has no member named 'getFreeSketchSpace'
ESP_WebConfig_Master:166: error: 'Update' was not declared in this scope
ESP_WebConfig_Master:170: error: 'Update' was not declared in this scope
ESP_WebConfig_Master:174: error: 'Update' was not declared in this scope
'stopAll' is not a member of 'WiFiUDP'

What Arduino IDE Version did you use?
I tried Arduino 1.6.1 and 1.6.5 same result. What is going wrong. I even reinstalled esp8266 version 1.6.4.
The first version of proteus74 compiles perfect with 1.6.1 and works. Not very reliable but works if you just let it run.
User avatar
By martinayotte
#23738
proteus74 wrote:normaly, when no config was applied to the esp, the esp takes the a "general" config and writes it to the eeprom (see in Main-Ino-File).


Yes, I've figured that out. The problem is that it won't turn the AP mode without commenting the ConfigureWifi() call.
Code: Select all   if (AdminEnabled)
   {
      WiFi.mode(WIFI_AP_STA);
      WiFi.softAP( ACCESS_POINT_NAME , ACCESS_POINT_PASSWORD);
   }
   else
   {
      WiFi.mode(WIFI_STA);
   }
//   ConfigureWifi();


This is because the call to "WiFi.begin(config.ssid.c_str(), config.password.c_str());" will force back to STA mode.
By checking the core lib, hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.cpp, we can see that WiFi.begin is turning the mode to STA, because the flag _useApMode is false.

proteus74 wrote:Which ESP are you using?


I've tried with both ESP03 and ESP12E, same thing on both.

proteus74 wrote:I've read a litte bit about the WDT issue.
    ets Jan 8 2013,rst cause:4, boot mode:(1,6)

It means, that there is a problem with the deep-sleep mode not with the program. This problem can happen, when the ESP don't get enough power.


I wasn't able to repro again the WDT at startup, but I still have a WDT trying to access http://192.168.4.1/style.css directly, even with your fix in v1.1.3 :

Code: Select allReading Configuration
Configurarion Found!
HTTP server started
style.css

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 28780, room 16
tail 12
chksum 0x3d
ho 0 tail 12 room 4
load 0x3ffe8000, len 1532, room 12
tail 0
chksum 0x5d
load 0x3ffe8600, len 4724, room 8
tail 12
chksum 0x7f
csum 0x7f
rlpr����|��Starting ES8266
Reading Configuration
Configurarion Found!
HTTP server started
User avatar
By folny82
#23740 Hi voyager,

I use Arduino 1.6.5 and Board Manager I have added these boards http://arduino.esp8266.com/staging/pack ... index.json Next you need to add the most recent files cores from the page https://github.com/esp8266/Arduino/tree ... es/esp8266 in the directory C:\Users\User\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-804-g2d340c7\cores\esp8266
User avatar
By folny82
#23742 I think it would be better to replace the function of switching modes AP and STA automatically as it is in this sketch when ESP can connect up to ten seconds for the router to the AP mode automatycky off when it can not connect as AP mode remains switched on permanently here's the code. https://github.com/Lstt2005/ESP8266_I.O ... estart.ino