how to install micropython

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
kakaducsy
Posts: 4
Joined: Mon Apr 17, 2017 11:06 am

how to install micropython

Post by kakaducsy » Mon Apr 17, 2017 2:58 pm

hi
Im a new member, I dont know how to install mircopython on windows for esp8266,
I installed python 2.7 and run " pip2 install esptool"
and "esptool.py --port COM3 erase_flash" on cmd, but I dont know what to do next?
help me please!
thanks

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: how to install micropython

Post by Roberthh » Mon Apr 17, 2017 4:24 pm

The next thing would be to upload the firmware, as written here: http://docs.micropython.org/en/latest/e ... html#intro
The actual images are here: http://micropython.org/download/
The recent stable image is v1.8.7, today's daily build is 1.8.7.-623
The command would be:
esptool.py --port COM3 --baud 460800 write_flash --flash_size=detect 0 esp8266-20170108-v1.8.7.bin
Once you uploaded the image, you can connect to it using a terminal emulation program like putty, winscp, teraterm.
Be sure not to use flow control, and 115200 baud.
For file upload / download there are various tools available, of which rshell and ampy seem to be quite popular.
You can also connect through WiFI using webrepl, which can be found here:https://github.com/micropython/webrepl

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: how to install micropython

Post by Roberthh » Mon Apr 17, 2017 4:27 pm

You may also look here for useful hints:
viewtopic.php?f=16&t=1908

kakaducsy
Posts: 4
Joined: Mon Apr 17, 2017 11:06 am

Re: how to install micropython

Post by kakaducsy » Tue Apr 18, 2017 1:44 am

thank you,it run

Code: Select all

$▒߼#4 ets_task(40100164, 3, 3fff8398, 4)
could not open file 'main.py' for reading

MicroPython v1.8.7-7-gb5a1a20a3 on 2017-01-09; ESP module with ESP8266
Type "help()" for more information.
>>>
but I dont write command

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: how to install micropython

Post by Roberthh » Tue Apr 18, 2017 5:08 am

I don't know which terminal emulation program you are using, but it is essential to set 'flow control' ti None. This is done e.g. in Putty in the configuration pane under connection->serial.

kakaducsy
Posts: 4
Joined: Mon Apr 17, 2017 11:06 am

Re: how to install micropython

Post by kakaducsy » Wed Apr 19, 2017 1:24 am

Last edited by kakaducsy on Thu Apr 20, 2017 1:05 am, edited 1 time in total.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: how to install micropython

Post by Roberthh » Wed Apr 19, 2017 5:17 am

These steps are fine. Only the port in Putty may be different than COM3. You have to check, for instance with the device manager.
And WIndows has the bad habit of changing COM port numbers some time, especially when you use a different USB plug.

Post Reply