1. Prepare the board for flashing MicroPython
Wiring:
Code: Select all
connect
PIN3 (EN = Enable) to PIN23 (3V3)
PIN12 (GND) to GND
PIN15 (GPIO11 SPI_CS0) to GND
PIN16 (GOIO6 SPI_CLK) to PIN24 (RST = Reset)
PIN20 (GND) to GND
PIN21 (RX) to TX of USB2Serial converter
PIN22 (TX) to RX of USB2Serial converter
GND to GND of USB2Serial converter
PIN23 (3V3) to Vcc (3.3V stable power supply)
I used yesterdays esp8266-20160830-v1.8.3-80-g1f61fe0.bin
Binaries are here: http://micropython.org/download/#esp8266
3. Upload the binary to the board
I used esptool.py (which can be found here https://github.com/themadinventor/esptool/)
(please note the "-fm dout" option).
Code: Select all
$ esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash -fm dout -fs 8m 0x00000 esp8266-20160830-v1.8.3-80-g1f61fe0.bin
esptool.py v1.2-dev
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0320
Writing 532480 @ 0x0... 532480 (100 %)
Wrote 532480 bytes at 0x0 in 47.2 seconds (90.2 kbit/s)...
Leaving...
$
Switch PIN15 from low to high level (disconnect from GND and connect to 3V3) and reset the board.
5. Run MicroPython
Start your favourite terminal emulator and soft reset (Ctrl+D).
Code: Select all
$ picocom --baud 115200 /dev/ttyUSB0
...
ll��l쎌
l�l����l�#4 ets_task(40100390, 3, 3fff6300, 4)
Performing initial setup
Traceback (most recent call last):
File "_boot.py", line 11, in <module>
File "inisetup.py", line 37, in setup
File "inisetup.py", line 9, in wifi
OSError: can't set AP config
could not open file 'boot.py' for reading
could not open file 'main.py' for reading
MicroPython v1.8.3-80-g1f61fe0 on 2016-08-30; ESP module with ESP8266
Type "help()" for more information.
>>>
Here's the video evidence:
https://www.youtube.com/watch?v=uImWqKknDyA
Now someone will have to find out why initial setup is naggy