-->
Page 1 of 2

NodeMCU not retaining sketch

PostPosted: Sun Dec 20, 2015 7:15 pm
by simplesi
I've used NodeMCU Lua and it retains programs so that I can discconect from USB and run standalone with just 5V PSU.
But faced with normal memory issues with Lua - I've tried switching to Arduino IDE

I tried this with Arduino IDE and no response when just powered from 5V. Sketch only works after uploading and keeping USB connected.

I tried the simple Blink sketch just to eliminate my programming and it behaves the same.

Is this normal?

OR can it be easily fixed? :)

Simon

Re: NodeMCU not retaining sketch

PostPosted: Mon Dec 21, 2015 6:28 am
by eduperez
I would bet your 5v power supply is the culprit here...

Re: NodeMCU not retaining sketch

PostPosted: Mon Dec 21, 2015 8:51 am
by martinayotte
The GPIO0 should be returned to HIGH to boot in Exec mode.
If you recycle power after a working upload, it will re-enter in UpLoad mode.

Re: NodeMCU not retaining sketch

PostPosted: Mon Dec 21, 2015 7:21 pm
by simplesi
The GPIO0 should be returned to HIGH to boot in Exec mode.
If you recycle power after a working upload, it will re-enter in UpLoad mode.


Aah - great clue there :)

I had an IR Diode connected to GPIO0 that was obviously preventing this from happening!

I changed my sketch to use GPIO4 (D2 on NodeMCU) and it works fine

I now have a WiFi enabled IR Sender :)

Thanks very much
Simon