Hello, I'm trying to connect Teensy with esp32. I'm using Esp 32 to communicate with an Iot app and the data from the app need to be transferred to teensy. I was using Arduino mega for the same application but decided to replace it with teensy. I'm connecting the tx from esp 32 to rx on teensy and rx from esp 32 to tx on teensy[Esp 32Tx to pin 7 & Esp32 Rx to pin 8 and GND to GND]. I'm unable to receive any communication btwn the esp32 and teensy. Clueless on how to get both of them working.
This the piece of the code I'm using for the teensy.
This one is for ESP32
I'm following the steps from this tutorial
www.programmingboss.com
Any idea how get them both working together. Thanks
This the piece of the code I'm using for the teensy.
Code:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hello Boss");
delay(1500);
}
This one is for ESP32
Code:
#define RXp2 16
#define TXp2 17
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial2.begin(9600, SERIAL_8N1, RXp2, TXp2);
}
void loop() {
Serial.println("Message Received: ");
Serial.println(Serial2.readString());
}
I'm following the steps from this tutorial

How to Exchange Data between Arduino and ESP32 using Serial Communication?
To establish serial communication between Arduino and ESP32, cross-connect TX & RX pins of Arduino and ESP32. UART communication ESP32 and Arduino uno
Any idea how get them both working together. Thanks