• sales

    +86-0755-88291180

ESP32 C3 0.42LCD display Hello world

1, Hardware connection: 

Directly connect the Type C USB port to the computer, and the serial port will be automatically recognized after connecting to the hub

2, Software burning:

2.1. Copy the following code to the Arduino IDE

#include<Arduino.h>

#include<U8g2lib.h>

#ifdefU8X8_HAVE_HW_SPI

#include<SPI.h>

#endif

#ifdefU8X8_HAVE_HW_I2C

#include<Wire.h>

#endif

#defineSDA_PIN5

#defineSCL_PIN6

U8G2_SSD1306_72X40_ER_F_HW_I2Cu8g2(U8G2_R0,/* reset=*/U8X8_PIN_NONE);//

voidsetup(void){

Wire.begin(SDA_PIN, SCL_PIN);

u8g2.begin();

}

voidloop(void){

u8g2.clearBuffer();// clear the internal memory

u8g2.setFont(u8g2_font_ncenB08_tr);// choose a suitable font

u8g2.drawStr(0,10,"Hello World!");// write something to the internal memory

u8g2.sendBuffer();// transfer internal memory to the display

delay(1000);

}


Note: The text characters in parentheses of 'Hello World!' can only be English letters and cannot be in Chinese

2.2. Use a type-c cable to connect the computer to the ESP 32-c3 development board. After successful connection, the serial port will be displayed in the computer management window

2.3. Click on Tools in the Arduino IDE, then click on Port and select the serial port Adafruit QT ESP32-C3

2.4 Click to Verfy

2.5 Click  to upload

2.6 6. Waiting for upload


After successful upload

The display effect of the development board is as follows


TAG: Milk-V Arduino 0.96inch RGB OLED Serial UART Bus Servo ST3020 TTL 25KG.CM Magnetic-Encoder High precision and Large torque Raspberry Pi 5 Silver-Shadow Case Power Raspberry Pi LCD Display Screen 1.3inch LCD with Game Button AND Audio Buzzer For Zero 2W / 3B / 4B / PI5 / RP2040-PiZero Pan-Tilt Kit RP2040-Keyboard-3 Raspberry Pi Camera V2 Luckfox Pico Pro Raspberry Pi Secondary Screen ESP32 S3 R8 MP3 Board 2.8inch LCD TouchScreen Display Speaker/SD-Card/Battery/QMI8658-6-Axis-Sensor Raspberry Pi ESP32-AI Series User Guide Jetson Digital Photo Frames Raspberry Pi Industrial 10.1 inch DSI LCD HMI TouchScreen MIPI Display 1280x800 10.1inch One-Body PC With Front Camera For Pi 4/5 Jetson Nano 5G module Laser 450nm 5W high precision module Adjustable focal length For Laser Carving / Laser 3D Printing Python HTTP Request Communication