I am trying to get simple UART communications working on the ESP32-PICO-DevKitM-2 (Module: ESP32-PICO-MINI-02 and Chip: ESP32-PICO-V3-02).
The UART0 on GPIO3 (U0RXD) and GPIO1 (U0TXD) work fine and I can print to the Arduino serial monitor. I have selected the board: ESP32 PICO-D4.
I am unable to get a second UART working. I have tried using GPIO8 (U2CTS) and GPIO7 (U2RTS) and it is not working. For testing I have the TX line on the ESP32 connected to a serial port converter (TTL to RS232) and viewing results in Putty.
Here is the simple code I am using:
#include <SoftwareSerial.h>
#define rxPin 7
#define txPin 8
// Set up a new SoftwareSerial object
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
void setup() {
Serial.begin(9600);
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
// Set the baud rate for the SoftwareSerial object
mySerial.begin(9600);
delay(2000);
mySerial.println("**** PRINTING TO COM6 ****");
Serial.println("---- PRINTING TO COM14 ----");
}
void loop() {
// put your main code here, to run repeatedly:
}