How to fetch data from GPS S1216R8 module using arduino atmega2560
Which GPS module do you have? That device id is an IC.
The datasheet says it is 9600 8N1. Give this code a try and see if you see data from the GPS. Connect the GPS serial pins to the serial1 pins (D18 and D19).
void setup {
Serial.begin(115200);
Serial1.begin(9600);
Serial.println("GPS TEST");
}
void loop() {
while(Serial1.available()) {
Serial.write(Serial1.read());
}
}
edit: The datasheet also states this is a 3.3v device. You should use a logic level converter between the TX1 on the Mega and RX on the GPS.
I am using GPS S1216R module actually . And its nt fetching the data by the code stated by you
Then it is not connected correctly or the unit is malfunctioning.
Is it this unit?
edit: Do you have an o-scope available? If so, now would be the time to use it to determine if there is serial output from the device on the TXD pin.
Yes that is the unit u mentioned
o scope variable??? i am unaware of this variable
Do you have an oscilloscope available? It is an electronic test instrument.
No I dont have an oscilloscope cable? can suggest alternate solution??