Arduino Pro micro Serial communication problem with Node MCU I recently bought an ATmega32U4 based Arduino Pro micro. I am using the Keyboard library and interfacing with my PC via USB.
I am trying to create a serial communication between the Arduino Pro micro and a NodeMCU via Rx, Tx pins (0, 1), but it isn't working i.e. not giving any output with the code below on the Pro micro:
#include &lt;Keyboard.h&gt;

int incomingByte;
unsigned long lastTime;
    
void setup() {
  Serial.begin(115200);
  Keyboard.begin();
}
    
void loop() {
  if (Serial.available() &gt; 0) {
    lastTime = millis();
    String payload = &quot;&quot;;
    
    while (1) {
      if (millis() - lastTime &gt; 1000)
        break;
    
      incomingByte = Serial.read();
      Serial.println(incomingByte);
    }
  }

On the NodeMCU there is a simple script flashed which only writes on serial some characters in a delayed loop.
When using the SoftwareSerial library with the Pro micro, it is working fine i.e. I can read data sent by the NodeMCU on custom Rx, Tx pins (9, 10). I tried this because I thought since Pro micro is communicating with a PC, the original Rx and Tx pins are busy. But after some research I got to know that unlike other Arduino boards like the UNO, the Pro micro doesn't use those for communication over USB.
Although custom serial using SoftwareSerial library is working, it is too slow and unreliable i.e. it takes 2-3 seconds to pass a string of length 10. Also its unreliable because on sending bigger length strings, the strings arrive incomplete or sometimes the data gets corrupted (characters shuffle).
Again this is not my main concern, if I can use original Rx, Tx pins as usual on any other Arduino boards, it solves my issue.
This is my circuit diagram:
RX and TX pin of Arduino Micro are Serial1. Replace Serial in your sketch with Serial1 to communicate with esp8266 over RX and TX pin.