Hello,
im having some trouble when trying to use the serial monitor on my custom esp32-c3-mini-1, flashinf is working fine, but i didnt got any response in the serial monitor, i already tried every method that i could find on the internet, here is my platformio.ini file:
This activates Hardware CDC and changes the behavior of the Serial objects: Serial: output is routed to the builtin USB Serial Serial0: output is routed to UART0 (RX: 20 / TX:21) Serial1: output is routed to UART1 (RX: 18 / TX:19)
Hey @sivar2311 thanks for the reply, it still didint work, i tried running the following code but still got nothing on the serial monitor:
#include <Arduino.h>
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
Serial0.begin(115200);
Serial.println("hello world");
Serial1.println("hello world from serial 1");
Serial0.println("hello world from serial 0");
}
void loop() {
Serial.println("hello from the loop");
Serial1.println("Hello from the loop via serial 1");
Serial0.println("Hello from the loop via serial 0");
delay(1000);
}
i also tried only one at a time and still got nothing.
Regrads,
I’m a bit confused.
GPIO’s 20 and 21 are used by Arduino for RX0 and TX0.
According to page 11 of the ESP32-C3-Mini Datasheet, these GPIO’s are used for USB D+ and D- !?
I suspect that this is the cause and that the variant esp32c3 and the used pins_arduino.h does not match your board correctly.
I use C3 or S2 or S3 boards and USB-C and there are few things I noticed:
1- if your program runs for 1s and board goes to sleep you will not see anything because your computer will not have enough time to discover the port that ESP32 is emulating
2- if I want to see what is printed, I apply delay(5000) on boot
3- for always on programs the initial delay is also needed to see the first prints
4- I only activate Serial.begin and then Serial.print - no need to go to seria1 or 2