Usage Example for FireBeetle 2 ESP32-E - CAN Data Transmission via UART
Last revision 2026/01/14
This tutorial will demonstrate how to send data "t11123333" to the CAN bus through the UART interface of ESP32-E. Another CAN-to-TTL module will receive the data and display it on the serial monitor.
Hardware Preparation:
- TEL0150 Gravity: CAN to TTL Communication Module ×2
- DFR0654 FireBeetle_Board_ESP32_E ×1
- FIT0668 Type-C&Micro 2-in-1 USB Cable ×2
Connection Diagram:

Sample Code:
void setup()
{
Serial1.begin(115200, SERIAL_8N1, /*rx =*/D3, /*tx =*/D2);
delay(10); //Give a delay to ensure that the previous setup instruction is completed
Serial1.println("S3\r"); //Set the CAN baud rate to 100kbits/s
//delay(10); //Give a delay to ensure that the previous setup instruction is completed
Serial1.println("O\r"); //Turn on CAN communication
}
void loop()
{
Serial1.println("t11123333\r");
delay(1000);
}
Operation Steps:
Connect the module to the FireBeetle Board ESP32-E following the wiring diagram shown above.
Open the Arduino IDE and upload the code to the FireBeetle Board ESP32-E.
Open another serial assistant and select the corresponding serial device for the module. In the serial assistant, send "S3" to set the CAN baud rate to 100 kbits/s. Then, send the command "O" to activate CAN communication. You will then be able to receive the data "t11123333" in the serial assistant.
Note: The baud rate of the module's UART interface needs to match the baud rate selected in the serial assistant.
Result

Was this article helpful?
