- [env:esp32-c3-devkitm-1]
- platform = espressif32
- board = esp32-c3-devkitm-1
- framework = arduino
- monitor_speed = 1152000
- build_flags =
- -D ARDUINO_USB_MODE=1
- -D ARDUINO_USB_CDC_ON_BOOT=1
ESP32 C3 Development Board wont print to serial monitor
ESP32 C3 Development Board wont print to serial monitor
Hello, I've just received a few of these boards to try out and my first attempts have failed. I have googled but not found any solution. Basically, when the board is connected to my PC (Windows 10) via the USB cable, and I have successfully uploaded a sketch to it using the correct COM port, I would normally expect to see something on the serial monitor but nothing. Yes, it is set to the correct baud rate. I have downloaded and installed the enhanced CH343 driver too. So I decided to connect a serial to USB adapter to pins IO21, IO20 (TX0 and RX0) and GND - yes I have TX connected to RX - and open a putty window connected to that adapters COM port but still nothing. Next, I connected the same adapter to IO0 and IO1 (TX1 & RX1) and altered the sketch to Serial1.begin and Serial1.print() as appropriate and still nothing comes through. I don't even get any of the normal preamble messages via USB when I press RST as you get with say ESP32 WROOM modules. I have tried both the latest Arduino IDE 2.0.5 and 1.8.19 and have made sure flash mode was DIO although I have tried DOUT too.
I want to be able to print out to the monitor messages such as BMP180 found or LoRa module found etc so I know the code and the module are working but I simply cant get anything to display on the serial monitor.
Now, I have two of the classic boards with the CH343 chip on board and two without and I get the same problems with all four boards. They are all made by LUATOS.COM who do have a decent wiki once google translates it from Chinese.
Please don't complain that I haven't included my code because its not just one sketch, its every one I try where Serial.begin() and Serial.print() are used - including code would not help.
Is there something I am missing?
I want to be able to print out to the monitor messages such as BMP180 found or LoRa module found etc so I know the code and the module are working but I simply cant get anything to display on the serial monitor.
Now, I have two of the classic boards with the CH343 chip on board and two without and I get the same problems with all four boards. They are all made by LUATOS.COM who do have a decent wiki once google translates it from Chinese.
Please don't complain that I haven't included my code because its not just one sketch, its every one I try where Serial.begin() and Serial.print() are used - including code would not help.
Is there something I am missing?
-
- Posts: 1
- Joined: Thu Mar 16, 2023 6:53 pm
Re: ESP32 C3 Development Board wont print to serial monitor
Hi,
Did you recently upgrade your Arduino Environment and (as I did) forget some of the settings required to get the burning and transcript processes over the serial USB connection running:
- set cdc enabled
- eventually connect pin 9 of the esp32-c3 to ground
Following the FAQ information in
https://wiki.dfrobot.com/SKU_DFR0868_Be ... 3#target_9
Good luck!
Daniel
Did you recently upgrade your Arduino Environment and (as I did) forget some of the settings required to get the burning and transcript processes over the serial USB connection running:
- set cdc enabled
- eventually connect pin 9 of the esp32-c3 to ground
Following the FAQ information in
https://wiki.dfrobot.com/SKU_DFR0868_Be ... 3#target_9
Good luck!
Daniel
Re: ESP32 C3 Development Board wont print to serial monitor
I had the same problem when I tried my first luatos ESP32C3 board yesterday. But at first I was not even sure if code was uploaded correctly to the board. I didn't see any indications of problems in the Arduino IDE (using v. 2.0.4, on Win11 PC). I was expecting to use response on Serial Monitor to confirm that things were working. I'm not sure exactly what made it suddenly function as expected. But when I searched for pin numbers for onboard LEDs, I noticed from a review of the luatos board, is that Flash Mode should be set to "DIO" (under tools in Arduino IDE). It was "QIO" in my default Arduino IDE setup.
When I connected my second luatos board today, it immediately started blinking the onboard LEDs. I noticed that I got response on the serial monitor when set to 921600 baud. So the board was shipped with a demo with WIFI soft-AP with option to control one of the onboard LEDs from a client. But everything worked as I'm used to from other ESP32 boards I have used, including serial monitor, when I uploaded another example that included Serial.begin(115200)
When I connected my second luatos board today, it immediately started blinking the onboard LEDs. I noticed that I got response on the serial monitor when set to 921600 baud. So the board was shipped with a demo with WIFI soft-AP with option to control one of the onboard LEDs from a client. But everything worked as I'm used to from other ESP32 boards I have used, including serial monitor, when I uploaded another example that included Serial.begin(115200)
Re: ESP32 C3 Development Board wont print to serial monitor
I have the same issue and no clue how to solve. I can upload my code and see code is running (LED is blinking), but don't see any output from "Serial.println"
I have a custom board ESP32 C3 Super Mini (from Ali Express) and I am trying to get this board running. As usual before writing "real code" I am testing with Blinky and some Serial Prints to the Terminal. I am using PlatformIO as this is "normally" the better platform for writing applications.
The code I am successfully downloading is the following:
In PlatformIO, I am using a project using the following "platformio.ini":
The result of this:
Terminal window connects with ESP32C but no output shown:
I used Google to identify possible solutions, but didn't find any, although mentioned as a problem quite often. The potential solutions I found, I tried and implemented as described in platfromio.ini, but not working.
Maybe someone in this forum is able to come up with a good idea what else I can do.
Any help is highly appreciated.
I have a custom board ESP32 C3 Super Mini (from Ali Express) and I am trying to get this board running. As usual before writing "real code" I am testing with Blinky and some Serial Prints to the Terminal. I am using PlatformIO as this is "normally" the better platform for writing applications.
The code I am successfully downloading is the following:
Code: Select all
#include <Arduino.h>
#define LED 8 // LED_BUILTIN for ESP32C Super Mini
void setup() {
Serial.begin(460800);
// Set pin mode
pinMode(LED,OUTPUT);
Serial.println("setup: Led set to Output");
}
void loop() {
digitalWrite(LED,HIGH);
delay(1000);
Serial.println("loop: Led set HIGH");
digitalWrite(LED,LOW);
delay(1000);
Serial.println("loop: Led set LOW");
}
Code: Select all
[env:esp32c3_supermini]
platform_packages = toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
platform = espressif32
board = esp32-c3-devkitm-1
; change microcontroller
board_build.mcu = esp32c3
; change MCU frequency
board_build.f_cpu = 160000000L
framework = arduino
build_flags =
-DARDUINO_USB_MODE=1
-DDARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_ESP32C3_DEV=1
monitor_speed = 460800
Terminal window connects with ESP32C but no output shown:
I tried it with two different boards - both same behavior?* Executing task in folder ESP32C3 Super Mini: C:\Users\Bernd\.platformio\penv\Scripts\platformio.exe device monitor --environment esp32c3_supermini
--- Terminal on COM5 | 460800 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
I used Google to identify possible solutions, but didn't find any, although mentioned as a problem quite often. The potential solutions I found, I tried and implemented as described in platfromio.ini, but not working.
Maybe someone in this forum is able to come up with a good idea what else I can do.
Any help is highly appreciated.
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: ESP32 C3 Development Board wont print to serial monitor
Thanks for the link ... but this is not solving the issue or I am still doing something wrong
"... If you use the USB connector, you should have that enabled (-D ARDUINO_USB_CDC_ON_BOOT=1) and set USB Mode to “Hardware CDC and JTAG” (-D ARDUINO_USB_MODE=0). ..."
I put the build_flags as described in the article into platformio.ini:
build_flags =
-D ARDUINO_USB_MODE=0
-D DARDUINO_USB_CDC_ON_BOOT=1
Still no Serial output.
I played around and searched I-Net for other ideas how to solve ...
I finally found an idea to use "USBSerial" instead of "Serial" ... this does the trick (USBSerial.println(str))
To be honest - I am still not sure why this solves the problem.
I would like to continue using Serial instead of USBSerial to be able to exchange easily code between Arduino-boards and different ESP32-boards - but it looks not possible until I find a solution for ESP32C3 Super Mini.
If anyone has another solution in mind ... I would highly appreciate.
"... If you use the USB connector, you should have that enabled (-D ARDUINO_USB_CDC_ON_BOOT=1) and set USB Mode to “Hardware CDC and JTAG” (-D ARDUINO_USB_MODE=0). ..."
I put the build_flags as described in the article into platformio.ini:
build_flags =
-D ARDUINO_USB_MODE=0
-D DARDUINO_USB_CDC_ON_BOOT=1
Still no Serial output.
I played around and searched I-Net for other ideas how to solve ...
I finally found an idea to use "USBSerial" instead of "Serial" ... this does the trick (USBSerial.println(str))
To be honest - I am still not sure why this solves the problem.
I would like to continue using Serial instead of USBSerial to be able to exchange easily code between Arduino-boards and different ESP32-boards - but it looks not possible until I find a solution for ESP32C3 Super Mini.
If anyone has another solution in mind ... I would highly appreciate.
Re: ESP32 C3 Development Board wont print to serial monitor
Hi Slonni,
I have/had the same problem.
I have set the compiler flag "ARDUINO_USB_MODE" to 1. This way I can generate serial output. But somehow the setup function is very fast and I can only print in the loop function. With a delay in setup I can print there too.
My .ini for PlatformIO looks like this:
The following test programm works this way.
I have/had the same problem.
I have set the compiler flag "ARDUINO_USB_MODE" to 1. This way I can generate serial output. But somehow the setup function is very fast and I can only print in the loop function. With a delay in setup I can print there too.
My .ini for PlatformIO looks like this:
The following test programm works this way.
- #include <Arduino.h>
- #define BUILTIN_LED 8
- void setup() {
- Serial.begin(115200);
- pinMode(BUILTIN_LED, OUTPUT);
- delay(1000);
- Serial.println("-------------------------");
- Serial.println("Setup");
- Serial.println("-------------------------");
- }
- void loop() {
- digitalWrite(BUILTIN_LED, HIGH);
- Serial.println("Loop.");
- delay(500);
- digitalWrite(BUILTIN_LED, LOW);
- delay(500);
- }
-
- Posts: 1
- Joined: Fri Mar 15, 2024 8:33 am
Re: ESP32 C3 Development Board wont print to serial monitor
I had the same issue. Whatever I did, it didn't print in a serial monitor.
I tried the Blink code with "Serial.println" and "USBSerial.println" but didn't work.
It finally worked using Serial.println only. I just changed the following setting in Tools.
- USB CDC On Boot: "Enabled"
I tried the Blink code with "Serial.println" and "USBSerial.println" but didn't work.
It finally worked using Serial.println only. I just changed the following setting in Tools.
- USB CDC On Boot: "Enabled"
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: ESP32 C3 Development Board wont print to serial monitor
USBSerial is used by devices with a full USB hardware device (S2 & S3 atm).
It should not be used by devices with a hardware USB aka HWCDC (the -C and -H series).
For those devices, enable "USB CDC on boot" and the "Integrated USB JTAG" output.
This will assign the Serial object to use the HWCDC.
This is equivalent to "-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1"
The HWCDC takes some time to initialize, so if you have a device in a reboot loop, you will often not see anything in the serial monitor, not even the boot log.
It should not be used by devices with a hardware USB aka HWCDC (the -C and -H series).
For those devices, enable "USB CDC on boot" and the "Integrated USB JTAG" output.
This will assign the Serial object to use the HWCDC.
This is equivalent to "-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1"
The HWCDC takes some time to initialize, so if you have a device in a reboot loop, you will often not see anything in the serial monitor, not even the boot log.
- jgustavoam
- Posts: 165
- Joined: Thu Feb 01, 2018 2:43 pm
- Location: Belo Horizonte , Brazil
- Contact:
Re: ESP32 C3 Development Board wont print to serial monitor
HardwareSerial.h 2.0.6 not work with code 2.0.5
https://github.com/espressif/arduino-esp32/issues/7706
https://github.com/espressif/arduino-es ... 1430601741
I achieve serial communication using the Coolterm program.
https://learn.sparkfun.com/tutorials/te ... -mac-linux
Serial port Setup :
Initial Line States when Port opens:
DTR OFF and RTS OFF (both must be OFF)
These lines were resetting the board. And blocking communication.
In Arduino IDE V2.0.3, I looked for my board's setup - AI-Thinker ESP32-C3-32S and I didn't find it. Maybe that's why the console doesn't work. CH340 chip configuration must be incompatible.
https://docs.ai-thinker.com/en/esp32c3
https://github.com/espressif/arduino-esp32/issues/7706
https://github.com/espressif/arduino-es ... 1430601741
I achieve serial communication using the Coolterm program.
https://learn.sparkfun.com/tutorials/te ... -mac-linux
Serial port Setup :
Initial Line States when Port opens:
DTR OFF and RTS OFF (both must be OFF)
These lines were resetting the board. And blocking communication.
In Arduino IDE V2.0.3, I looked for my board's setup - AI-Thinker ESP32-C3-32S and I didn't find it. Maybe that's why the console doesn't work. CH340 chip configuration must be incompatible.
https://docs.ai-thinker.com/en/esp32c3
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Who is online
Users browsing this forum: No registered users and 136 guests