NodeMCU V2 Dev. Board

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
thehose
Posts: 2
Joined: Tue Aug 25, 2015 5:40 pm

NodeMCU V2 Dev. Board

Post by thehose » Tue Aug 25, 2015 9:10 pm

Hey folks,

Trying Micropython on my NodeMCU V2 (ESP8266 12-E) development board. Playing with the REPL is fine but when I use main.py and a finite loop it never stops...

Code: Select all

import pyb
pin = pyb.Pin(14, pyb.Pin.OUT_PP)
for i in range(10):
    pin.low()
    pyb.delay(1000)
    pin.high()
    pyb.delay(1000)
    
I would expect this script to blink 10 times and return control to REPL.
Also when I connect the virtual terminal to the board I get this repeated with every blink...

Code: Select all

load 0x40100000, len 30800, room 16 
tail 0
chksum 0xd8
load 0x3ffe8000, len 1388, room 8 
tail 4
chksum 0xa3
load 0x3ffe8570, len 19964, room 4 
tail 8
chksum 0xd6
csum 0xd6
...C MEM CHECK FAIL!!!
drl..rl....b....n...nn......l.p......ll.ll.........l..n......b..l..b.......b...b..lrlr.n.......n...
 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 30800, room 16 
tail 0
chksum 0xd8
load 0x3ffe8000, len 1388, room 8 
tail 4
chksum 0xa3
load 0x3ffe8570, len 19964, room 4 
tail 8
chksum 0xd6
csum 0xd6
...C MEM CHECK FAIL!!!
drl..rl....b....n...nn......l.p......ll.ll.........l..n......b..l..b.......b...b..lrlr.n.......n...
Is as if the board reboots after every iteration.

What am I missing ????
Thanks....

User avatar
SweetPeas
Posts: 8
Joined: Mon Aug 24, 2015 11:06 am

Re: NodeMCU V2 Dev. Board

Post by SweetPeas » Wed Aug 26, 2015 2:44 pm

Looks like you are being bitten by the watch dog.
I'm not sure if there is a yield command int the esp class, that would be needed to make the ESP8266 run smoothly.
A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible.

thehose
Posts: 2
Joined: Tue Aug 25, 2015 5:40 pm

Re: NodeMCU V2 Dev. Board

Post by thehose » Wed Aug 26, 2015 5:01 pm

Can you elaborate (for my education) about the watch dog (timer I presume) issue. Is it causing the ESP8266 to reboot randomly (since I see the MEM CHECK failures) ??
Is this an issue with MP on ALL ESP8266s or specific to this Chinese dev. board.

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: NodeMCU V2 Dev. Board

Post by mianos » Sat Sep 05, 2015 12:36 am

It would be best to use the ESP scheduler for this. It has to service the wifi in the background so you can't really spin in a loop for 1 second. I'll try and put some code up for my ESP timer module.

Post Reply