How to configure ESP32 to Arduino IDE

The Longer Laser Engravers are equipped with a powerful ESP32-based mainboard, which can offer high computing speeds and advanced features such as WiFi, Touchscreen Display, microSD slot and so on. In particular, Longer Ray5 has an MKS LTS mainboard, which offers excellent engraving speeds with precise adjustment of the laser module's power.

One of the main risks for the mainboard of Longer Laser Engravers is to manually move the motor axes. This action, in fact, generates a current that goes from the motors to the mainboard, damaging the stepper drivers irreparably. When this happens, the mainboard can no longer move the axle motors and must be replaced. However, as mentioned before, the mainboard is based on ESP32, and therefore even if it is no longer suitable for use with Longer Ray5, it can still be useful for other projects.

As seen in the previous article, once you understand that the Longer Ray5 mainboard is to all intents and purposes a powerful ESP32-based development board, and after identifying the location of the various GPIOs, the next step is to make it operational. To do this, the reference software is Arduino IDE, the environment that allows you to write and run C++ code on ATMEGA and ESP32 boards.

The first step is to download the latest stable version of the Arduino IDE from the official website (arduino.cc). By default, the Arduino IDE is configured for classic Arduino boards, so in order to see the ESP32 of MKS LTS you need to add the definitions of the Espressif boards.

In the Boards Manager, search for "ESP32" and click Install for the Espressif Systems package.

Once this has been done successfully, unlike a commercial board, MKS LTS does not appear with its specific name in the list. However, since it is based on a standard module, the correct configuration to select is "ESP32 Dev Module, with the following configuration:

Board: ESP32 Dev Module

Flash Mode: DIO

Flash Frequency: 80MHz

Upload Speed: 921600

At this point, power MKS LTS with 12V DC, and connect the mainboard to the PC via the USB cable. Select the COM port for the CH340 serial chip, and then run a test sketch. Once you click on Upload, keep an eye on the console: if the upload reaches 100%, the MKS LTS is officially reborn as a development board.

Keep in mind that in order to use the console, it is always necessary to set a delay of 5 seconds in each sketch, as shown in the figure:

Having the environment configured correctly is the only real barrier between a corrupted board and a working project. With the Arduino IDE ready and the GPIO pins already mapped, the limit is no longer the hardware that no longer moves the motors but only the complexity of the code you decide to write on it.

lascia un commento

Si prega di notare che i commenti devono essere approvati prima di essere pubblicati.