Skip to main content
1 of 3

Poor man's serial sniffer: reading Serial.print logs of an Arduino esp32 dev kit from another

(I use ESP32 dev kits with Arduino api.)

My dev kit 1 is running my firmware; and I want to measure the current it draws, therefore I don't like to plug the USB in.

As I need to read the logs from the dev kit 1, I want to plug another dev kit that collects the log from the first through the UART.

The dev kit 1 firmware is as it is, but on the dev kit 2, I wrote such a thing:

#include <Arduino.h>
#include <Hardware.h>

HardwareSerial Reader();

void setup() {
    Serial.begin(115200);
    Reader.begin(115200, SERIAL_8N1, 16, 17); 

}

void loop() {
    while(Reader.available()) { 
        Serial.print(Reader.read());
    }
}

The wiring is as follows:

Dev kit 1 Wiring Dev kit 2 (sniffer)
TXD <=> RXD (16)
RXD <=> TXD (17)
GND <=> GND

But this doesn't work. Any idea?