Example Code for Arduino - Serial Port (Basic Tutorial)

Mapping is required for initializing ESP32-S3 serial port. Available ports: Serial, Serial1, Serial2

Hardware Preparation

FireBeetle 2 ESP32-S3 AI Board with OV2640 Camera x 1

Software Preparation

When you use the ESP32 for the first time, you need to know the following steps:

  1. Add the ESP32 development board in Arduino IDE (How to add the ESP32 board to Arduino IDE?)

  2. Select the development board and serial port

  3. Burn the program

Basic APIs

  • Serial1.begin(baud, config, rxPin, txPin);

    • Description: Serial1 initialization

    • Parameters:

      • baud: baud rate
      • config: data bit and stop bit setting
      • rxPin: RX pin
      • txPin: TX pin

Sample Code

Serial1.begin(9600,SERIAL_8N1,/*rx =*/0,/*Tx =*/1);  

Was this article helpful?

TOP