Hello guys! hope you can help me out.. it's pretty urgent becuz its a project due soon and i can't figure it out. ):
int incomingData;
int RX = 0;
void setup()
{
pinMode(RX, INPUT);
Serial.begin(38400);
Serial.print("Now tracking GPS...");
}
void loop()
{
if(Serial.available() > 0)
{
incomingData = Serial.read();
Serial.print(incomingData);
}
}
This block of code what i wanna upload to my arduino duemilanove w/ ATmega328.
my problem is this, whenever i try to upload, avrdude: stk500_getsync(): not in sync: resp=0x00 appears.
I have looked up the common problems but none of those seems to be the cause!
while i learnt from other users that i can connect the TX pin of board to the OUTPUT pin of the gps to directly view the data being output by the GPS on the serial monitor, i can only upload without getting the error statement above when i connect this way. but what i really want is to read and process the data received, which i suppose i have to use the RX pin instead.
So my question is, how do i get the board to respond to the upload when the RX pin of the board is connected to the OUT pin of the GPS?