yoga mahaputra
yoga mahaputra

Reputation: 1

Troubleshooting Arduino IDE: ESP32 Serial Monitor Not Showing Up

I've created a custom keyboard using an ESP32 WROOM 32 with an included CP2102, programmable via USB type C.

Here is a section of my schematic:

img 1

img2

img3

img4

After assembling it and connecting it to my PC, the CP2102 is detected in Device Manager: img device manager ss

Here are my settings in the Arduino IDE: img arduino setting

u use a simple example code to display serial output on the Serial Monitor using Arduino IDE for ESP32:

void setup() {
  // Initialize serial monitor at 115200 bps
  Serial.begin(115200);
}

void loop() {
  // Write message to serial monitor
  Serial.println("Hello, world!");
  delay(1000); // Wait for 1 second
}

After I uploaded it to my board, the terminal displayed the following: img arduino terminal

PROBLEM**

When I open the serial monitor, there is no data displayed at any baud rate.

Can you help me identify where my mistake or error might be?

Upvotes: 0

Views: 626

Answers (1)

ChipChop Gizmo
ChipChop Gizmo

Reputation: 401

Without seeing your keyboard code I can only wildly guess that you are using the serial communication via primary RX/TX pins to send keystrokes to the PC but the Serial Monitor also talks to the ESP over the primary RX/TX

With the serial communication only one hardware/software application can use it at the time, so who ever get's there first will take over that serial port, in your case it's probably the keyboard side or actually the PC OS itself so the Arduino Serial Monitor just hangs.

The only solution I can think of would be to use the secondary hardware RX2/TX2 for the keyboard (you would just need a slight change in the code) ...you should have at least another set on an ESP32, I think it's pin 12 & 14 on the Wroom and to add another physical USB port to your design so the PC would see the keyboard as another COM port and the primary would be the COM port for the Serial Monitor.

If you can't change your PCB then I guess you could for the sake of debugging add (temporarily) a small screen to the ESP and output debugging info there?

Upvotes: 0

Related Questions