Example Code for Arduino-Blink

Last revision 2026/01/14

This article provides a comprehensive guide to setting up the Arduino IDE for Beetle ESP32 microcontroller, including manual installation of the CH340 driver if necessary, configuration of FireBeetle-ESP32 board URL, and installation of the FireBeetle-ESP32 library. Once the development environment is set, users can implement the Blink code using the default LED pin D9. The code involves initializing the pin as an output and creating a loop function to turn the LED on and off with a one-second delay. The article ensures users have successfully installed necessary components, verified board selection, and connected the microcontroller via USB to proceed with coding.

Hardware Preparation

Software Preparation

Beetle ESP32 adopts CH340 serial chip that can be used without driver among most devices. If you find the driver is not installed automatically after plugging into the device, you can install it manually: click to download the CH340 driver program.

CH340_Driver_install for beetle esp32

Follow these steps to set up the Arduino IDE:

step1 to set up for beetle esp32File->Preferences

step2 to set up fpr beetle esp32-Paste URL here

  • Click OK.
  • Open Tools->Board->Boards Manager, wait for automatic update, then install FireBeetle-ESP32.

step3 to set up for beetle esp32 - install FireBeetle-ESP32

Now, the development environment has been installed, you can use it like a normal Arduino board.

installing beetle esp32 library is finished

Other Preparation Work

  1. Ensure the CH340 driver is installed correctly on your computer.
  2. Verify the FireBeetle-ESP32 board is selected in Arduino IDE (Tools->Board->FireBeetle-ESP32).
  3. Connect the Beetle ESP32 to your computer via Micro USB.

Sample Code

The default LED for Beetle Board-ESP32 is D9, input following code:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(D9, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(D9, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(D9, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second

Was this article helpful?

TOP