Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By AusUser
#55315
rudy wrote: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.


I've made some progress which has given me some comfort that is not a hardware issue.

    flashed using NONOS_SDK_V2.0.0.0_16_07_19
    Ran putty and using AT+CWMODE=3 followed by AT+CWLAP I recieved full list of AP detected by my ESP8266

Before disconnecting I ran
Code: Select allAT+CWMODE_DEF=3


Reconnected my usb, started Arduinio IDE and loaded the Wifiscan sketch, Then Bingo an AP list was displayed in the serial monitor. As 2nd test, I reset the ESP8266 and uploaded another sketch, this time the wifiacesspoint sketch. Saw the AP listed on my Iphone and was able to connect to the webserver.

I'm happy this is working, but i'm not clear on the fix. While it looks like running the command AT+CWMODE_DEF=3 solved my problem but I expect this setting was overwritten when I uploaded the first sketch.

Or was it just that I flashed esp8266 before uploading the ardunio sketch and this needs to be done *sometimes* (or everytime)prior to uploading a new sketch to avoid issue?
User avatar
By IOT_VENEZUELA
#55321 Hello friend .
i will recomend to you :

verify voltage on esp12e is correct ,esp12 needs at least > 1 amp
verify tx rx are connected properly
i Use arduino ide 1.6.11 with no problems at all
install esp8266 library available
load and run example esp8266 WIFICLIENTBASIC
add your ssid and password on the code
after loading sketch don't forget to remove bootloader jumper
Make sure your wifi router is dhcp ready and available
i will recommend to assign an unique ip to your esp8266 (mac addres) on your wifi router so it assigns same ip every time

Note ,
if the voltage you have connected to the esp12 is not enough , it will not connect

Post your code here , so we can see what the problem could be .
bye
User avatar
By martinayotte
#55329 When an Arduino sketch is uploaded, the AT firmware is erase/gone/useless.

About Arduino equivalent function for AT+CWMODE_DEF=3 is WiFi.mode(WIFI_AP_STA), simply add this call into your setup()