Page 1 of 1

TinyPico ES32 - Serial Hardware interface

Posted: Tue Dec 03, 2019 3:01 pm
by jquinno
I'm trying to set up a serial interface with another device and I intend to use the TinyPico which comes with a ESP32 Pico D4.
I'm using Arduino to compile my source.

https://images.squarespace-cdn.com/cont ... rmat=2500w

In the esp32 datasheet, it mentions that it is possible to use any of the GPIO pins as either Tx/Rx for the UART interface. I would like to set say, GPIO27 and GPIO15 as Rx/Tx respectively. Would it be possible to assign those pins to UART1??

Code: Select all

#include <HardwareSerial.h>

HardwareSerial mySerial(1);

void setup() {

    mySerial.begin(115200,SERIAL_8N1, 16, 21);

}

As of now, I'm not able to get the UART interface working. I was wondering whether this is the right way to use an extra UART interface in the TinyPico

Welcome any advise. Thanks

Re: TinyPico ES32 - Serial Hardware interface

Posted: Wed Dec 04, 2019 6:49 am
by mikemoy
Try
#define RXD2 16
#define TXD2 17


HardwareSerial Serial2(2);
Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2);