Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By AusUser
#55013 I'm trying to get my ESP-12e connected to my wifi for the first time using Arduino and basic wifi connection sketch. :D

The sketch constantly shows waiting for connection in the terminal window. And I've waited up to 10minutes for with no connection.

I've reflashed with ESP-12 with NONOS_SDK_V2.0.0_16_07_19 and run the following AT commands. From the below I've determine it having issues scanning for networks sucessfully

OK
AT+GMR
AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(656edbf)
compile time:Jul 19 2016 18:43:55


When I first run, straight after boot

[OK
AT+CWMODE=3

AT+CWLAP

ERROR


After a period of time, maybe 5 minutes I run the command again and I get list of wifi networks. Is this delay normal can I do anything to reduce this time so the ESP is more stable with establishing a wifi connection

Thanks in advace
User avatar
By rudy
#55015 I have never used the AT command set firmware but there should be no significant delay. Certainly not 5 minutes. It usually take a couple of seconds for a scan.

If it is a new module then I would suggest trying sketches without wifi, starting with the blink sketch. Have you used this esp module before? (without problems)
User avatar
By AusUser
#55038
rudy wrote:I have never used the AT command set firmware but there should be no significant delay. Certainly not 5 minutes. It usually take a couple of seconds for a scan.

If it is a new module then I would suggest trying sketches without wifi, starting with the blink sketch. Have you used this esp module before? (without problems)


sketches without wifi work fine and I've done a blink loop and dht sensor outputting to serial terminal. Is there a verbose wifi sketch I can run that will help troubleshoot this further? This is the first time I'm trying to get the esp working with wifi

Is the Espressif firmware version relevant if the arduino ide over writes it every time?
User avatar
By rudy
#55043 The Espressif bootloader starts up and if the control inputs are set to run code (instead of load code to flash) it then will run the program. That will be whatever program was last loaded. Every time you load a new program it overwrites what was previously there. So even running something small like the blink program, it will destroy whatever program was there before. And the program that used AT commands as input, it is history on the first sketch you uploaded. Of course you could reload that code. But whenever you program new code it overwrites the previous code.

You can enable verbose diagnostic output. I have it on the version I run at home but I can't recall exactly what it is called. It is under the tools menu. Near the board selection.