The Serial
object is controlled by the flag ARDUINO_USB_CDC_ON_BOOT
(and ARDUINO_USB_MODE
) - See ESP32-S3 native USB interface and Serial Monitor missing first messages - #10 by sivar2311
The lolin_c3_mini.json
sets ARDUINO_USB_CDC_ON_BOOT=1
.
To clear this flag, add to your platformio.ini:
build_unflags=
-DARDUINO_USB_CDC_ON_BOOT
If you now hover over the Serial
object in your code, you should see HardwareSerial Serial
instead of HWCDC Serial
.