You will be needing a set of tools in order to develop for the ESP32.
We rely on Winget to make our life a bit easier. Therefor our first step on windows would be to Install Winget.
Once that's done, we can install the tools we need:
winget install --id Git.Git -e --source winget
winget install -e --id Python.Python.3.10
winget install -e --id AivarAnnamaa.Thonny
winget install -e --id GoLang.Go
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install esptool
go install github.com/nats-io/natscli/nats@latest
git clone git@github.com:area3001/ira_mpy.git
Download the latest Micropython firmware for your controller. For the IRA, we use the ESP32_GENERIC-SPIRAM firmware
Under Windows, this is called a COM port. You can find this in the device manager under Ports (COM & LPT). To make things easier, we will export this to an environment variable:
set COM_PORT=COM4
Under Mac & Linux, this is called a tty port. You can find this by running the following command:
ls /dev/tty*
You should be looking for something like /dev/ttyUSB0
or /dev/ttyS0
. We will export this to an environment variable:
export COM_PORT=/dev/ttyUSB0
esptool.exe --chip esp32 --port %COM_PORT% erase_flash
esptool.exe --chip esp32 --port %COM_PORT% --baud 460800 write_flash -z 0x1000 "file_location\___.bin"
esptool.py --chip esp32 --port $COM_PORT erase_flash
esptool.py --chip esp32 --port $COM_PORT --baud 460800 write_flash -z 0x1000 "file_location\___.bin"
Use Thonny or Pycharm to copy the following files to the ESP32:
- main.py
- fx
- ira
In order to use your device, you will have to configure it first. This means configuring the wifi and the outputs. Take a look at the Configuration Guidelines for more information.
winget install -e --id AivarAnnamaa.Thonny
- Download PyCharm from https://www.jetbrains.com/pycharm/
- Install the Micropython plugin in PyCharm
This was based on https://mischianti.org/micropython-with-esp8266-and-esp32-flashing-firmware-and-using-pycharm-ide-3/