I have a Feather Huzzah ESP8266.
following this tutorial:
https://learn.adafruit.com/building-and ... e?view=all
I can create a firmware build with no problem, and load it with the Windows tool NodeCMU.exe. I get a REPL prompt and can run python interactively.
When I tried to create a build with main.py as a startup, the new firmware load boots normally, and still goes to the REPL loop but does not run my python script:
main.py:
print ("build success")
when I first went to edit this file, it did not exist on the VM.
The bootup reads:
<line of trash>
l|þrÿ#4 ets_task(40100164, 3, 3fff828c, 4)
OSError: [Errno 2] ENOENT
MicroPython v1.8.7-498-gdbb2aea on 2017-03-27; ESP module with ESP8266
Type "help()" for more information.
>>>
Looks like ENOENT means 'file not found'; not sure what is going on.
I tried deleting main.py and rebuilding but the make file won't run (won't create a new bin).
Need help! Can't wait to use this board...
ESP8266: can't run main.py
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jerryn
- Posts: 1890
- Joined: Sat Sep 14, 2013 9:05 am
Re: ESP8266: can't run main.py
What has worked well for me is to copy main.py to the board using "ampy" after flashing the CircuitPython Image with the stock boot.py and no main.py.
This way I get a chance to check it out via REPL first!
Then I copy my version of boot.py and main.py and any other support scripts.
Good luck!
sorry - meant to include this link for information on ampy https://learn.adafruit.com/micropython- ... s?view=all
This way I get a chance to check it out via REPL first!
Then I copy my version of boot.py and main.py and any other support scripts.
Good luck!
sorry - meant to include this link for information on ampy https://learn.adafruit.com/micropython- ... s?view=all
- mknoblock
- Posts: 13
- Joined: Tue Jul 26, 2016 12:44 pm
Re: ESP8266: can't run main.py
Thanks!
I also see where MQTT is supposed to ship with Micropython, but I get 'no module named umqtt' when I try to import it. Any chance you've seen this?
I also see where MQTT is supposed to ship with Micropython, but I get 'no module named umqtt' when I try to import it. Any chance you've seen this?
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: ESP8266: can't run main.py
[moved to the MicroPython forum]
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: ESP8266: can't run main.py
mknoblock, why are you building MicroPython yourself? Using the official builds make it more likely everything works as expected.
It looks like umqtt is in the micropython-lib: https://github.com/micropython/micropython-lib You should just need to copy the file over to install. No build necessary.
It looks like umqtt is in the micropython-lib: https://github.com/micropython/micropython-lib You should just need to copy the file over to install. No build necessary.
Please be positive and constructive with your questions and comments.