With a breakout assembled, I now have to install Micropython.
There's a great set of instruction here, but I found I needed to take some additional steps.
Below, I will outline what worked for me. I was working on Ubuntu with Python 3 installed.
- FTDI Breakout Board
- 3v3 Power Supply
- Wire up the ESP32 as shown in the following diagram
The 3v3 and GND connections power the board
The EN connection controls resetting the board
The GPIO0 and GPIO2 connections set the board in 'DOWNLOAD_BOOT' mode
- Download esptool from here, and unzip
- Download the latest micropython .bin file from here (Latest version as of 25/4/19 is esp32-20190425-v1.10-293-g56f6ceba7.bin)
- Open a terminal in the esptool directory
- Power the board and plug in the USB cable
- Move the enable line (shown in blue) from GND to 3V3 to enable the ESP32
- Run this command to find the port that is being used
dmesg | grep tty
In my case, running this gave
[ 0.000000] console [tty0] enabled [ 167.73492] usb 1-6: FTDI USB Serial Device converter now attached to ttyUSB0
So I can see that it is attached to ttyUSB0 from line 2
Then run the following, replacing 'ttyUSB0' with the port the previous step gave
sudo python3 esptool.py --port /dev/ttyUSB0 erase_flash
Finally, run the following, again replacing 'ttyUSB0' and the location of where you downloaded the .bin file ('esp32-201 ... 9.4.bin)
sudo python3 esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20180511-v1.9.4.bin
With this completed, I can now use that serial port to access micropython's REPL python prompt and run commands!