Home > Basics > How to set up the environment by Beetle ESP32 C3

How to set up the environment by Beetle ESP32 C3

1. Introduction of Beetle ESP32 C3

The Beetle ESP32-C3is a development board based on the ESP32-C3 RISC-V 32-bit single-core processor chip, designed specifically for Internet of Things (IoT) devices.

In a compact coin-sized form factor, the Beetle ESP32-C3 offers up to 13 IO pins, eliminating concerns about running out of IO ports when working on projects. The main control board also integrates lithium battery charging management, allowing direct connection to a lithium battery without the need for additional modules while ensuring application size and safety.

The Beetle ESP32-C3's expansion board provides additional power outputs without significantly increasing the size, making it easier for project assembly and soldering. The onboard GDI display interface resolves wiring complexities when using screens.

Supporting Wi-Fi and Bluetooth 5 (LE) dual-mode communication, the Beetle ESP32-C3 reduces the difficulty of device network configuration. It also supports Bluetooth Mesh and Espressif's Wi-Fi Mesh protocols, offering enhanced communication stability and broader coverage for a wide range of IoT applications.

The Beetle ESP32-C3 comes with detailed sample tutorials that enable easy utilization of wireless functionality and integration with IoT platforms such as Alibaba Cloud and IFTTT. Additionally, the DFRobot store provides thousands of sensors and actuators with comprehensive tutorials, allowing you to effortlessly build your own IoT system.

Programming the Beetle ESP32-C3can be done using Arduino IDE, ESP-IDF, or MicroPython. With support for both C language and Python, manipulating the hardware becomes a straightforward task.

The Beetle ESP32-C3 boasts an impressively small size, approximately that of a one-yuan coin, as shown in the image:

Here is a family portrait:

It includes one main board, one expansion board, and two sets of pin headers.

2. Setting up Development Environment

2.1 Power-on Trial

Using a USB cable to connect the development board to the computer, I noticed that the charging light kept flashing and the onboard user LED did not light up. It doesn't seem quite normal.

Generally, when the development board is shipped, it is programmed with a factory test program, at least the user LED should be on. This development board seems to have encountered an unexpected issue. Could it be that no program was burned during the manufacturing process?

Curious, I checked the Device Manager to see if any USB or serial port devices were recognized. To my surprise, the Device Manager kept refreshing repeatedly, indicating that the USB connection was constantly being made and disconnected.

Then I opened the Serial Port Debug Assistant to see if there were any error messages or anything printed. The serial port displayed the following:

It seems that the situation is indeed abnormal. I initially thought that the board was defective when it left the factory, so I contacted the staff at our Electronics Chip Bar for assistance. After careful deliberation, we have determined that reprogramming the firmware once should resolve the issue.

Here is a reference solution for your convenience:

Original URL: https://mc.dfrobot.com.cn/thread-313586-1-1.html

Now that we know the reason, let's continue. Currently, I haven't set up the development environment yet, so I'm unable to download the program onto the development board.

2.2 Setting up the Development Environment

There are various options for setting up the development environment for the esp32, such as Arduino IDE, ESP-IDF, and MicroPython. In this case, I will choose Arduino IDE since it is a familiar tool for me.

(1) Installing Arduino IDE

To install Arduino IDE, simply download the installation package from the official website and double-click to start the installation process. It is similar to installing any other software and there are no special instructions needed. Therefore, I won't go into detail about it here. The version I installed is 1.8.16.

After the installation of IDE is completed, it cannot be used directly because ESP32 cannot be selected as the development board. This is due to the lack of installation of the ESP32 support package.

(2)Installing the development board support package for ESP32

l Adding the board manager URL

Double-click on the Arduino IDE icon to open the IDE. Click on "File" -> "Preferences," and a window will pop up:

Then, paste the following URL: https://www.arduino.cn/package_esp32_index.json into the corresponding field.

Click "OK" to save and exit.

l Installing support package

Click "Tools" -> "Boards" -> "Board Manager" in the popup serial port search for esp, select the installation option for esp32, choose the appropriate version, and click "Install" to automatically download and install.

Because I have already installed the support package for ESP32 here, it displays "delete".

Installing in this way can be very slow and often unsuccessful, so we generally do not recommend using this online method. Instead, we choose a faster offline installation method.

If you want to install version 2.0.4 of the support package, all we need to do is download the 2.0.4 support package in advance and then copy it to the corresponding directory in Arduino.

Usually, you can download various versions of the support package from the official GitHub repository of ESP32. For example, the download link for version 2.0.4 is as follows:

https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esp32-2.0.4.zip

Another important point is that even if you have downloaded the 2.0.4 support package, you may still need other support packages during the installation process. Therefore, you also need to download all the other required packages to your local machine. Here are all the packages that I have downloaded in advance:

The location to which the offline support package should be placed is as follows:

After placing the offline installation package into the designated folder, repeat the previous installation steps by clicking on "Tools" -> "Development Board" -> "Board Manager". In the pop-up window, search for "esp" in the serial port, and an installation option for esp32 will appear. Select the desired version and click on "Install" to automatically download and install it.

Now, the installation will be completed quickly.

Now, open "Tools" -> "Development Board" and you will be able to select the development board that we are using.

(3)Run the test program

Write a program that makes an LED blink, download it to the development board, and see if you can successfully download and achieve the blinking of the LED.

Here is an example code:

Attention: It is mentioned before installing the IDE that you need to short-circuit D9 and GND for the first time downloading the program. Please pay close attention to this.

By following the steps above, I was able to successfully download and achieve the blinking effect of the LED. This proves that the environment setup is successful and we can proceed with the development of subsequent applications.

Prev:  MCU+AI Accelerators Becoming Increasingly Popular
Next:  What is the working principle of a development board
Would you like more details or pricing on the components mentioned above? Please complete the form below.
Submit Inquiry / Request Info