Using Wemos S2 Pico ESP32-S2 serial on Arduino
Just a quick note after yesterday's S2 Pico OLED
I encountered some hiccups getting
Serial.println() to work on Arduino with
this board. Essentially nothing would come out of Serial Monitor after reprogramming.
I think the core of the issue is that the ESP32-S2 has native USB. ESP8266 and older ESP32 boards used a USB serial converter chip, so programming over serial vs. printing to serial happened without any glitches to the USB. Now with native USB I think here's what happens:
- You press Button 0, cycle Reset and release B0
- ESP32-S2 boots into "programming mode" and initializes native USB as COM port
- You hear the USB connection sound as COM port is assigned
- Arduino reprograms the flash
- You manually press reset
- USB COM port actually drops at this point
- When you have
Serial.begin();in your code, it now initializes native USB as COM port again
- You hear the "USB chime" again from your computer, and COM port is assigned
Now if you're used to having Arduino Serial monitor open all the time, the same COM13 that was there during programming on my PC is now a "new" COM13. It seems the serial monitor doesn't notice the change. Solution is simple:
- Reprogram your chip.
- Reset, wait for the "chime"
- Only now open the serial monitor
The irksome thing is, that I'll now need a delay in
setup() to see what's
going on. Maybe I have an old version of Arduino or something. If you
know another solution, you're welcome to drop me a line (me at codeandlife.com)