Nodemcu, working on simple sketches, wifi one errors

Hi everybody, I am having some issues with my NodeMCU 0.9.

I can upload simple sketches like blink (as you can see below, uploading went ok)

Sketch uses 222,145 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 31,512 bytes (38%) of dynamic memory, leaving 50,408 bytes for local variables. Maximum is 81,920 bytes.
Uploading 226288 bytes from /var/folders/k0/4rhm42l95gx771dfmdtpqc9c0000gn/T/buildd5ae82e677127ac286f51de66781d807.tmp/Blink.ino.bin to flash at 0x00000000
................................................................................ [ 36% ]
................................................................................ [ 72% ]
............................................................. [ 100% ]

or any other... but when I try to upload simple wifi ones, like "WifiScan" (the one that comes with the examples)
Uploading works fine:

Sketch uses 226,637 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 31,844 bytes (38%) of dynamic memory, leaving 50,076 bytes for local variables. Maximum is 81,920 bytes.
Uploading 230784 bytes from /var/folders/k0/4rhm42l95gx771dfmdtpqc9c0000gn/T/build85dc86b056dfe4d4576356a59a826805.tmp/WiFiScan.ino.bin to flash at 0x00000000
................................................................................ [ 35% ]
................................................................................ [ 70% ]
.................................................................. [ 100% ]

I get this kind of errors on serial terminal:

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

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
ˇ
Exception (29):
epc1=0x4000e1b2 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3ffef120 end: 3ffef450 offset: 01a0

stack>>>
3ffef2c0: 00000484 00000484 000003fe 401004f4
3ffef2d0: 00000000 00001000 000003fe 40106ff8
3ffef2e0: 40004b31 3ffef310 0000001c 4021a1b5
3ffef2f0: 40105666 4021a29d 3fff01e4 000003ff
3ffef300: 000003fd 3ffef3b0 3fff01e4 000003fd
3ffef310: ffffff01 55aa55aa 0000000f 0000001c
3ffef320: 0000001c 0000005d 0000005e 000003ff
3ffef330: 4021a68c 3fff01e4 3fff01e4 000000ff
3ffef340: 00000001 3ffef3d0 4021a813 00000008
3ffef350: 3fff01e4 000000ff 3ffef3b0 00000000
3ffef360: 3fff02a4 3ffef411 00000001 4021a8a0
3ffef370: 3ffef3b0 3fff01e4 3fffdad0 3ffee420
3ffef380: 3ffef3d0 3fff651c 3fff01e4 3fffdad0
3ffef390: 4021a8dc 3ffee3f4 00000000 feefeffe
3ffef3a0: 40201f44 feefeffe feefeffe 0001c200
3ffef3b0: 00000000 00000000 3ffee3f4 401004d8
3ffef3c0: feefeffe feefeffe 3fff01d4 40201a65
3ffef3d0: 00000000 00000001 feefeffe feefeffe
3ffef3e0: feefeffe feefeffe feefeffe 0001c200
3ffef3f0: 0000001c 00000000 3ffee3f4 40202370
3ffef400: 40219f02 00000001 3ffee300 3fffdad0
3ffef410: 40201d9f feefeffe feefeffe 3ffee420
3ffef420: 3fffdad0 3ffee300 3ffee3f4 40201c1e
3ffef430: feefeffe 00000000 3ffee418 402028cc
3ffef440: feefeffe feefeffe 3ffee430 40100718
<<<stack<<<

Any help would be appreciated.

Try one or 2 of my NodeMCU examples that are known good for the current Arduino core,

Only to be used with ArduinoIDE 1.6.8 ... it may work on later versions, it may give errors.

What you are seeing on the serial terminal is a stack-dump caused by something in code ... or the WDT firing. In any event, try my NodeMCU without WiFi to see if you can get the system to be stable.

IMO the #1 cause of ESP8266 issues is a poor power supply / that is, either noisy or poorly regulated. When the WiFi kicks in, the current can spike to 750 - 800mA. The quick pulses of current can create dips in voltages inside and outside the chip due to resistance. It is absolutely mandatory to have a good power supply.

Ray
My Projects

Hey @mrburnette: tried all the non-wifi examples...all of them worked.

I am using the nodemcu attached to the USB port, since, I want to do debugging.

aleza:
<...>tried all the non-wifi examples...all of them worked.

I am using the nodemcu attached to the USB port, since, I want to do debugging.

Try my latest wifi sniffer program... It uses wifi in promiscuous mode, so power requirements are under 50mA. If this works, then I suspect some type of voltage sag due to current increases during transmit.

Good luck,

Ray

Hi aleza,

The clue is when you said that all non-WiFi sketches worked.

The answer is here:

Oldmicroguy