ESP-IDF Installation and Build
ESP-IDF is a framework or set of tools provided by Espressif - the manufacturer of the ESP32-S3 chip used by Loco.
ESP-IDF runs on Linux, MacOS and Windows and you can find instructions here.
There are four steps to installing the tools and building and running the Loco example code.
- Install Git
- Install ESP-IDF
- Download the example code
- Build and Run
The following instructions are for Windows.
Linux and MacOS users should be able to get the general idea from this and use the Espressif website.
Install Git
Download Git here.
You are probably already aware of Git. If not you should find out more but we will use it to download the example code from the Brennan repository at Github.
Install ESP-IDF
Follow the links on the Espressif page to the Windows Installer Download

Download the Example code
You need to decide where to put the example project. Its not really important so I suggest you use your user profile directory - usually c:\users\username.
In the Power Shell window type
cd ~
git clone https://github.com/martinbrennan/locoDemo1.git
This downloads the example code as a project to the folder locoDemo1.
Build and Run
Connect your Loco PCB to your PC using a USB cable.
Then type the following commands into Power Shell
cd locoDemo1
idf.py build
idf.py flash monitor
The build step compiles all the code in the example. This takes longer the first time (a minute or so) but is much quicker on subsequent rebuilds.
The flash command programs the ESP chip on the Loco PCB. You can do this as many times as you want.
The monitor command starts the program on the ESP32 and displays any messages sent by the ESP32 in the Power Shell window.
To exit the monitor you must hit CTRL+]
Pressing the reset button on the Loco PCB will restart the program last loaded.