Hi! I found a myriad of similar posts online about linking GPS units to Arduino boards, but I do not have much experience with Arduino boards as of yet and I was hoping someone could help me with this.
I have a Trimble Copernicus II that outputs 4800 baud RS-232 NMEA data, updating each second. The first thing I did was to get out the 'ol voltmeter, which showed a spike in voltage each second, so it doesn't appear to be broken. Next, I hooked up the data line from the GPS to digital pin 0 on the Arduino Uno, using the code on this page: Arduino Playground - GPS to see if anything would happen. I uploaded the code to the Uno and nothing happened (I didn't really expect it to). Could somebody please steer me in the right direction here? Thanks!
I think I got mine going with help from
Arduino Tutorials | tronixstuff.com chapter 19.
( mine wasnt your make)
I hooked up the GPS data pin to D0 on the Uno and ran the code under that tutorial:
/*
Example 17.1
Display any data coming out of the GPS receiver in the serial monitor box
tronixstuff.com/tutorials > Chapter 17
*/
// as the GPS module sends data out serially, we just pick it up character by
// character and repeat it to the serial output
byte aa;
void setup()
{
Serial.begin(4800); // the module runs at 4800 bps, not 9600!
}
void loop()
{
if (Serial.available()>0) // if there is data coming into the serial line
{
aa = Serial.read(); // get the byte of data
Serial.print( byte(aa) ); // send it to the serial monitor
}
}
Off the bat, nothing happened, but I will continue to investigate!
EDIT:
The original code actually said "Serial.print(aa, BYTE); // send it to the serial monitor", but that brings up the error "The 'BYTE' keyword is no longer supported.". I looked for a quick fix online and came up with switching it to "Serial.print( byte(aa));". That might be a problem if what I did does not function the same way as the original code would have. It compiled and uploaded without a problem though.
"Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip. "
I tried using the TTL output of the GPS with the same code, but still no results.
I dont know what IDE you are using, but I think the tutorials are still v 22 ?
I will try it with v22. Mine is currently 1.01.
There is still nothing on the serial monitor. I downloaded v22, uploaded the exact code from the tutorial, hooked up the TTL output of the GPS to pin D0, but nothing showed up after several minutes on the monitor. Using the voltmeter, I can see that the voltage is going up to 3.3v each second, so I do not see how this isn't showing up on the serial monitor.
Rs- 232 uses negative voltages you need a RS-232 to ttl converter. Applying a negative voltage to the pins of an arduino may damage it. You need to test the pins to see if they are still working.
Mark