Page 1 of 1

"NameError: name not defined" with micropython on esp-01

Posted: Sun Apr 17, 2016 4:04 pm
by electronicsguy
Hello all,
I just started using micropython. I used the pre-compiled firmware from Adafruit (available here: https://learn.adafruit.com/building-and ... d-firmware) and flashed it onto a ESP-01 board using ESP8266Flasher.exe for Windows. This worked fine.

I use Coolterm to connect to the board. However, I am getting problems. This is what I get on boot-up:

Code: Select all

l`.prn`....rb`l.b.nb|.lll...brnnn...l`...nn..l..nrn..b.l.rn..b.l
.C MEM CHECK FAIL!!!
drlS
>>> 
Micro Python v1.4.2-99-g6738c1d on 2015-05-12; ESP module with ESP8266
Type "help()" for more information.
>>> help()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name not defined
>>> 
What am I doing wrong? It doesn't accept any commands, even

Code: Select all

help()
or

Code: Select all

quit()
Is 512KB memory too small for micropython?

Re: "NameError: name not defined" with micropython on esp-01

Posted: Tue Apr 19, 2016 9:40 pm
by deshipu
That firmware is from last year and doesn't include any of the huge work that has been done since, especially the kickstarter stuff.
I would strongly suggest to visit the ESP8266 section of this forum and see how to compile your own firmware, and use that.

Having said that, "help()" is not implemented yet, that's why it's not found. Also, what would "quit()" do on a microcontroller? There is no underlying operating system to quit to.

Re: "NameError: name not defined" with micropython on esp-01

Posted: Wed Apr 20, 2016 11:15 pm
by electronicsguy
deshipu wrote:That firmware is from last year and doesn't include any of the huge work that has been done since, especially the kickstarter stuff.
I would strongly suggest to visit the ESP8266 section of this forum and see how to compile your own firmware, and use that.

Having said that, "help()" is not implemented yet, that's why it's not found. Also, what would "quit()" do on a microcontroller? There is no underlying operating system to quit to.
Sure I'll go the compile route. I didn't mean quit() should do anything on the MCU. However, it should be programmed to gracefully degrade and give some kind of message saying "nothing to be done". It'd be better, IMO, to implement it as a no-op rather than have it give an error.