Flashing the ESP32

What you need

Preliminary steps

Make sure your USB cable can transmit data

A fully-featured USB 2 cable contains 4 wires: two are used for power transmission, and two for data. Some cables, especially on the cheaper end, only wire up the two power wires, meaning those can't pass any information.

To test your cable, you can try to plug in something that can trasmit data to your computer with that cable. An older phone, another microcontroller, a printer, whatever you might have to make sure it's known good.

The LED on the ESP32 lighting up does not mean the cable can tramsit data. All cables will be wired for power, thus the LED will always turn on, even with a bad cable

Install the required Arduino libraries

The library versions are susceptible to change if you read this page late after it was last updated

SSR1 - OSR2 - SR6

This library offers support for the ESP32 to the Arduino IDE, and is mandatory if you use an ESP32.

 

Via the taskbar on the left, click on the Boards Manager. Search for "ESP32", and install the esp32 library by Espressif Systems

image.png

SSR1 only

OSR2 and SR6 both use servomotors, but the SSR1 uses a BLDC (BrushLess Direct Current) motor, driven by an FOC controller, and we need two libraries to control it using the ESP32.

In the Library Manager tab, under the Boards Manager, search for "SimpleFOC". Install both the Simple FOC and SimpleFOCDrivers libraries, by Simplefoc.

 

As of January 1st 2024, you must use specific versions of said libraries:
Simple FOC 2.3.0
SimpleFOCDrivers 1.0.4

Once installed, do not update them

image.png

image.pngimage.png

Install the USB drivers for the ESP32

ESP32 boards are designed and maintained by Espressif, who have a handy guide on how to connect to them.
For our purpose, we only need the USB drivers, to be downloaded from Silicon Labs' website.

ESP32 boards should possess a cp2102 UART to USB chip, which handles talking to the computer over the USB cable. However, Espressif also lists FTDI as a possible manufacturer.

Check the chip circled in red on your own board, and make sure it has "SILABS" written on it before downloading and installing the Silicon Labs drivers.