From 318f931dbf05558d83f006e5d3272b2785a1157e Mon Sep 17 00:00:00 2001 From: mattmcw Date: Mon, 3 Jul 2023 22:44:43 -0400 Subject: [PATCH] ESP32 HardSerial note --- notes/esp32_serial/esp32_serial.ino | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 notes/esp32_serial/esp32_serial.ino diff --git a/notes/esp32_serial/esp32_serial.ino b/notes/esp32_serial/esp32_serial.ino new file mode 100644 index 0000000..af99b6b --- /dev/null +++ b/notes/esp32_serial/esp32_serial.ino @@ -0,0 +1,22 @@ + +#include + +#define RXD2 16 +#define TXD2 -1 + +HardwareSerial Serial2(1); + + +void setup () { + Serial2.begin(57600, SERIAL_8N1, RXD2, TXD2); +} + + + +void loop () { + now = millis(); + + if (Serial2.available() > 0) { + //cmdChar = Serial2.read(); + } +}