Hello,
I'm trying to receive data using a Teensy 4.1 and a GPS module but with no success. At first I just want print the NMEA data at the terminal but I receive nothing.
This is code I'm using. The RX/TX pins of the GPS module are connected to the pins 7/8 of the Teensy (The TX of the GPS module to the RX of the Teensy and the RX of the GPS module to the TX of the Teensy).
The Serial Monitor at the Arduino IDE remains empty. Do you have any ideas? Probably I am missing something here. Just a note that the GPS module is functioning properly with a RaspeberryPi that was connected via its UART.
Thanks!
My code:
My setup:
I'm trying to receive data using a Teensy 4.1 and a GPS module but with no success. At first I just want print the NMEA data at the terminal but I receive nothing.
This is code I'm using. The RX/TX pins of the GPS module are connected to the pins 7/8 of the Teensy (The TX of the GPS module to the RX of the Teensy and the RX of the GPS module to the TX of the Teensy).
The Serial Monitor at the Arduino IDE remains empty. Do you have any ideas? Probably I am missing something here. Just a note that the GPS module is functioning properly with a RaspeberryPi that was connected via its UART.
Thanks!
My code:
Code:
void setup(){
Serial.begin(9600);
Serial2.begin(9600);
}
void loop(){
while (Serial2.available() > 0){
char gpsData = Serial2.read();
Serial.write(gpsData);
}
}
My setup: