by Casey Anderson
- Adafruit HUZZAH32 – ESP32 Feather Board
- USB MicroB Cable
- Go to the downloads section of the Anaconda website here
- (On the same page) Scroll down until you see three buttons, one for each operating system supported by Anaconda. Click on Windows
- (On the same page) Find the header reading Python 3.7 version and click the Download button just below it
- Install Anaconda
- Click on the Start menu, you should be able to find an application called Anaconda Powershell Prompt. Launch that application
- Run the following in the Anaconda Powershell Prompt:
conda info
In the Anaconda Powershell Prompt:
conda create -n micropython python=3.7conda activate micropythonpip install esptoolpip install adafruit-ampyconda list(confirms thatesptoolandampyhave been installed)cd Documentsmkdir micropythoncd micropython
- Go to the Downloads section of the micropython site here and scroll down until you see a header reading Firmware for ESP32 boards
- Download the latest Standard Firmware (esp32-20190529-v1.11.bin as of this writing)
- (In the Anaconda Powershell Prompt):
conda activate micropython - Move the
.binfile you just downloaded to the micropython folder. For example, if you downloaded the file toDownloads, navigate to that folder in Anaconda Powershell Prompt and run the following:mv esp32-20190529-v1.11.bin ..\Documents\micropython
This driver enables communication between a PC and the ESP32 via USB
- Go here and find the header reading Download for Windows 10 Universal (v10.1.7 as of this writing)
- Click on the link reading Download VCP for Windows 10 Universal to intiate the download
- Install the driver
- Connect your
ESP32to your PC - Open Device Manager
- Scroll to Ports and click to expand
- Find the line reading Silicon Labs CP210x USB to UART Bridge. At the end of that line you should see
COMfollowed by a number (example:COM3). This identifies where your ESP32 is on your PC so write it down somewhere for use later.
- (In Anaconda Powershell Prompt)
cd Documents(or wherever you put your micropython folder) cd micropythonpwdto confirm you are in the right folderlsto confirm that the.binfile is the micropython folder- Erase the software that is already on the
ESP32:esptool --port COM3 erase_flash - Drivers in windows are a little wonky (sorry), so one of the following steps should write the
.binfile to the ESP32. Start with the first one and, if you get errors, try the second one:
- v1:
esptool --port COM3 --baud 460800 write_flash --flash_size=detect 0 esp8266-20171101-v1.9.3.bin - v2:
esptool --port COM3 write_flash 0x1000 esp8266-20171101-v1.9.3.bin
- When
esptoolis done activate the defaultcondaenvironment to shut it down:conda activate - Quit the Anaconda Powershell Prompt
Putty is an ssh and serial connection client for Windows. We will use it to access the Micropython REPL
- Go to the Putty download site here
- Find the header MSI (‘Windows Installer’), underneath it you should see a link to download putty 64-bit (
putty-64bit-0.71-installer.msias of this writing). - Install Putty
- Go to the Start menu, locate and launch Putty
- Set Putty to a serial connection and then enter the following information:
- Serial Port:
COM3(note: see Device Manager to confirm the port number for your ESP32) - Baud Rate: 115200
- Click Open. You will probably see a bunch of startup text and then the micropython command prompt:
>>> - Print "hello world!" with the micropython REPL:
print("hello world!") - Close Putty to shut down the connection
- Save this Python file to your
Documents/micropythonfolder - (In Anaconda Powershell Prompt)
conda activate micropython cd Documents/micropython- Run
blink.pyon theESP32:ampy --port COM3 run blink.py. Stop running the script by typing Ctl-C and then power cycle the ESP32 - To store the file on the
ESP32:ampy --port COM3 put blink.py - To see a file stored on the
ESP32:ampy --port COM3 get blink.py - To remove a file from the
ESP32:ampy --port COM3 rm blink.py - Or to see all of the files currently on the ESP32:
ampy --port COM3 ls - To shutdown: first activate the default conda environment:
conda activate, close the Anaconda Powershell Prompt
i built micropython as an .exe if thats what anyone is looking for https://github.com/Chris75HUN/micropython-windows-build