2258 views|2 replies

46

Posts

0

Resources
The OP
 

[Beetle ESP32-C3 Review] Part 2: vscode+idf+oled running through [Copy link]

This post was last edited by lingxin_yuhe on 2022-8-24 10:29

Preface: I have built the VScode+idf development environment. Later, I want to make a small demo of real-time time and weather display. First, I need to debug the display. I have an SSD1306, which should be enough for display, so I use it. The next step is to drive SSD1306.

链接已隐藏,如需查看请登录或者注册
project is available on GitHub . We modified it to adapt it to our ESP32-C3. Let's take a look at the adaptation process.

  1. Download open source projects

Go to the project address to download the source code, unzip it to the esp directory after downloading, and install the esp-idf directory, as shown in the figure.

Figure 1

  1. Adapt to ESP32-C3

Open VSCode and open the ESP32-IDF-OLED-SSD1306 folder. As shown in the figure, we will modify several places to adapt it to ESP32-C3.

Figure 2

  1. Modify the I2C configuration

Open the edit configuration interface as shown in Figure 2, and modify the I2C pin definition as shown in Figure 3. Because ESP32-C3 has only one I2C, SDA (GPIO8), SCL (GPIO9), and I2C port is 0.

Figure 3

  1. Modify the flash size

Because the flash size of ESP32-C3 is 4MB, it needs to be modified to 4MB, as shown in Figure 4. Note that you must click the Save button after the modification is completed.

Figure 4

  1. Compile and download

Click on Figure 2 and select ESP32-C3 as the processor, click on the project file path, select esp32c3, and select the first one, as shown in the figure below.

Click to compile the project. The antivirus needs to be turned off during the compilation process, otherwise the compilation will be very slow, as shown in the figure below. After the compilation is completed, it will prompt that the compilation is successful.

Insert the USB into the computer, set the serial port, and download the flash directly.

  1. Running Tests

After the download is complete, you need to restart and you will see the following interface.

esp32c3-oled

This post is from RF/Wirelessly

Latest reply

There are quite a lot of third-party libraries for ESP32, and they are easy to use.   Details Published on 2022-8-24 11:47
 

6818

Posts

11

Resources
2
 

On this basis, we modified it to adapt to our ESP32-C3. This post explains it in great detail. Thanks for sharing.

This post is from RF/Wirelessly
 
 

6742

Posts

2

Resources
3
 

There are quite a lot of third-party libraries for ESP32, and they are easy to use.

This post is from RF/Wirelessly
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list