Xinyuan-LilyGO / LilyGo-Cam-ESP32S3

44 stars 16 forks source link

UART Interface #12

Closed qbsho closed 4 months ago

qbsho commented 4 months ago

Hello,

I would like to connect a LSM100A over UART for Lora. Which UART (UART0, UART1, and UART2) is exposed on the tx/rx or is it better to use the IO16/IO17 for extra serial declaration?

qbsho commented 4 months ago

`#include HardwareSerial mySerial(1); // Instantiate a HardwareSerial object. Here, '1' refers to UART1. void setup() {

// mySerial.begin(baud rate, config, RX pin, TX pin, invert); mySerial.begin(9600, SERIAL_8N1, RXPin, TXPin); //used 15 and 16 }

void loop() { // Your code here to read or write data }`

works