Skip to content

Latest commit

 

History

History
103 lines (81 loc) · 3.76 KB

ESP8285.md

File metadata and controls

103 lines (81 loc) · 3.76 KB

ESP8285 Micropython Installation

Disclaimer: This is the method I have used to install/connect to the equipment I have listed below using a Mac. It is hoped that these steps will work on your hardware but differences in manufacturer, version, storage, firmware, RAM, etc. may change your results. Your mileage may (and probably will) vary.

Hardware

Software Installed on Mac

Utility to interact with a MicroPython board over a serial connection

pip install adafruit-ampy

A serial bootloader utility.

pip install esptool

CH340 / CH341 USB to serial installation package MAC OS drivers, support 32/64 Bit system with instructions for use.

Note: I felt REALLY nervous about downloading and installing this as the site out of China as I don't speak Chinese. Please execute your own caution. Google translate did a fairly good job of deciphering the site for me. The drivers seem to be working great!

Download, unzip, and install.

This should create a device in your Mac's /dev directory:

ls /dev/cu.wchusbserial*

should respond with something similar to this:

/dev/cu.wchusbserial40110

This is our serial device that we will use to connect the ESP8285. Make note of this.

Stable MicroPython firmware for ESP8266. Obviously this version will change over time.

Installing MicroPython

Connect hardware

Using a (seemingly standard) Micro USB cable, connect your Mac to the micro USB port on the ESP8285.

Note: I have heard some charging only cables aren't wired to pass data, so make sure the cable specifies data sync as well.

The blue LED on the ESP8285 should blink VERY briefly when powered up.

Erase the existing flash

Referencing your particular serial port mentioned above:

esptool.py --port /dev/cu.wchusbserial40110 erase_flash

Install MicroPython firmware

Referencing your particular serial port and MicroPython version mentioned above:

esptool.py --port /dev/cu.wchusbserial40110 --baud 115200 write_flash -fm dout -fs 8m 0x00000 esp8266-20171101-v1.9.3.bin

Please note the options for baud, fm, and fs. These seemed to differ from board to board, manufacturer, etc. These values worked for me for the hardware above (after some experimentation).

The install indicates that the board is reset afterwards BUT I unplugged and replugged just to make sure.

Getting a MicroPython REPL prompt

There are a variety of serial terminal packages available, I use screen. These instruction are for using screen, but you get the idea

brew install screen

Make the connection:

screen /dev/cu.wchusbserial40110 115200

As stated above, your device name may vary.

It is VERY likely that you session will display a bunch of garbage after connecting. BUT hopefully, something similar to the following will be displayed as well:

MicroPython v1.9.3-8-g63826ac5c on 2017-11-01; ESP module with ESP8266
Type "help()" for more information.
>>>

If NOT, play around with the baud rates (using other values than 115200 mentioned above).

Special Note: using ampy with the ESP8285

Using ampy to manipulate and maintain files on your ESP8285 makes things much easier.

However, please add the --delay option with ampy. It adds some delay into the connection to adjust for the garbage displayed initially.

For instance:

ampy --delay 2 --port /dev/wchusbserial40110 ls