Hi,
I have a ESP32C3-mini board from waveshare (https://www.waveshare.com/esp32-c3-zero.htm)
RGB LED on board is working as expected but Serial.print() is not working, not printing anything. What is the problem?
#define PIN1 8
#define LED1 10
#define onDelay 500
#define RGB_BRIGHTNESS 10
void setup() {
Serial.begin(9600);
pinMode(LED1, OUTPUT);
digitalWrite(LED1, HIGH);
delay(onDelay);
digitalWrite(LED1, LOW);
delay(onDelay);
}
void loop() {
delay(onDelay);
Serial.println("loop()");
delay(onDelay);
neopixelWrite(LED1,RGB_BRIGHTNESS,RGB_BRIGHTNESS,RGB_BRIGHTNESS); // Red
delay(onDelay);
digitalWrite(LED1, LOW); // Turn the RGB LED off
neopixelWrite(LED1,0,0,0); // Red
delay(onDelay);
neopixelWrite(LED1,RGB_BRIGHTNESS,0,0); // Red
delay(onDelay);
neopixelWrite(LED1,0,RGB_BRIGHTNESS,0); // Green
delay(onDelay);
neopixelWrite(LED1,0,0,RGB_BRIGHTNESS); // Blue
delay(onDelay);
neopixelWrite(LED1,0,0,0); // Off / black
delay(onDelay);
}
I also removed all LED code and left only Serial... lines, still not printing at all.
I tried serial console with Putty as well.
I am using Ardino 2.3.2 on Windows 11 Home 64bit
Hi @kahlenberg. A fairly unique thing about the boards that use the microcontrollers of the ESP32 family with native USB capability (as is the case with your board) is that they are typically configured to disable the use of their USB CDC serial port in the sketch by default.
That default disabled configuration is appropriate when your sketch doesn't use the serial port, but in cases where you do need it (such as when your sketch calls Serial.println, etc.), then it is necessary to configure the board so that the port will be enabled. Fortunately this is quite easy since the ESP32 boards platform developers configured the board definition to produce a custom board options menu you can use to enable or disable the port as needed via the Arduino IDE user interface.
Please try this:
Select Tools > USB CDC On Boot > Enabled from the Arduino IDE menus.
Upload the sketch to your board again, just as you did before.
Now check the Serial Monitor. Hopefully you will now see the expected output from the board there.
The instructions were intended for the OP who has a specific version of the ESP32-C3, a single core processor. Since you have selected a completely different board you don't see the option referred to above.