Hi friends !
This board ESP32 xiao s3 v1.2 Seeedstudio is almost new in market and there are some troubles that i faced while i was first using it. I would like to leave this post to other people who have faced the same problems and thank to the Arduino Forum for allowing us to enjoy this awesome platform:
1) Regarding to TX and RX pins: if you want to use Serial communication with TX and RX pins you must use
//Ensure you put letter D before the pin number. Otherwise it won't work
#define RX_PIN D7
#define TX_PIN D6
void setup(){
Serial1.begin(115200,SERIAL_8N1,RX_PIN,TX_PIN);
}
void loop(){
//Proceed to read or write the data coming from
//TX and RX pins
}
-Otherwise if you only will use Serial communication by USB wire you must use the standard Serial.begin(115200);
void setup(){
Serial.begin(115200);
}
void loop(){
//Proceed to log data into Serial Monitor with Serial.println()
//or Serial.read();
}
2) Regarding to see data from TX and RX pins in serial monitor: you must initialize both as follows:
//Ensure you put letter D before the pin number. Otherwise it won't work
#define RX_PIN D7
#define TX_PIN D6
void setup(){
Serial.begin(115200); //Data sent to PC
Serial1.begin(115200,SERIAL_8N1,RX_PIN,TX_PIN); //Data read by ESP32S3 XIAO
}
void loop(){
//Proceed to read or write the data coming from
//TX and RX pins and send to Serial Monitor via USB
if(Serial1.available()){
Serial.println(Serial1.read());
}
}
3 posts - 3 participants