Reputation: 1
I have esp32 T8-S3 (lilygo) and the only way I can get it to work is using MicroPython with Thonny/VS Code using PyMakr. I tried to start a project on Arduino IDE/PlatformIO (VS Code) but whenever I try to upload the code (not to open the monitor, once the code has been uploaded), it says it cannot open the port. The error on PlatformIO says:
A fatal error occurred: Could not open COMx, the port doesn't exist
I tried to change the number of the port (via device manager) as some posts suggested, but it didn't help.
However, the drivers are in fact okay since I can upload MicroPython sketches. I tried with empty file code as well, but it makes no difference.
I tried to re-flash the firmware (using Thonny/esptool via cmd), to reinstall the drivers, and also tried a different board (same module) but it is still the same. Windows Device Manager recognises it properly. I've worked a lot with different modules of esp32 (using both MicroPython and the Arduino framework), and I never had that problem before.
I currently try to get it to work on PlatformIO (VS Code, Windows)
platformui.ini file:
[platformio]
default_envs = dfrobot_firebeetle2_esp32s3
[env:dfrobot_firebeetle2_esp32s3]
platform = espressif32
board = dfrobot_firebeetle2_esp32s3
framework = arduino
upload_port = COM15
upload_speed = 921600
monitor_speed = 115200
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1
I tried with different speeds as well, and made to difference.
Am I missing here something?
Upvotes: 0
Views: 209
Reputation: 82
Platformio/Arduino does not support the boards that you mentioned, so in order to use it, you must add your board to it.
It can be accessed as dfrobot_firebeetle2_esp32s3
for T8 S3 and esp32-c3-devkitm-1
for T8 C3 in platformio/arduino.
For platformio, you need to define it in platformio.ini
file of your project
More information about how to use them is provided below.
For T8 S3 Visit LINK
For T8 C3 Visit LINK
add below config in platformio.ini
file
[platformio]
default_envs = dfrobot_firebeetle2_esp32s3
[env:dfrobot_firebeetle2_esp32s3]
platform = espressif32
board = dfrobot_firebeetle2_esp32s3
framework = arduino
platform = espressif32
monitor_port = COM15
upload_port = COM15
upload_speed = 921600
monitor_speed = 115200
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1 ;use the USB port as a serial port
Your baudrate should be initialise as given below in setup
.
void setup() {
Serial.begin(115200UL);
while(!Serial);
}
You must need to open terminal at 115200
Upvotes: 0
Reputation: 4014
The default_envs was not supposed to be used the way you use it.
You need an extra build flag to use the USB as the Serial port as per how the T8 S3 is designed:
[platformio]
default_envs = dfrobot_firebeetle2_esp32s3
[env:dfrobot_firebeetle2_esp32s3]
platform = espressif32
board = dfrobot_firebeetle2_esp32s3
framework = arduino
platform = espressif32
upload_port = COM15
upload_speed = 921600
monitor_speed = 115200
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1 ;use the USB port as a serial port
The default board manifest dfrobot_firebeetle2_esp32s3.json set the upload_speed
to 460800
, I think it is safe to use upload speed of 921600
, if you experience any upload error/problem, comment out the upload_speed = 921600
line.
I don't know why you'd want to run the Serial Monitor at such low speed of 9600bps for an MCU like ESP32, I took the liberty to change it to 115200.
Upvotes: 0