Go Down

Topic: arduino uno - venus gps 3.3 (Read 2145 times) previous topic - next topic

marta

I'm trying to connect with gps venus 3.3 and i'm using program example for parallex gps, but it doesn't work. To be more specyfic - it has a problem with BYTE in that line of code: Serial.print(byteGPS, BYTE);  Do you have any idea why?  
http://arduino.cc/playground/Tutorials/GPS

dxw00d

Yes, the code you are using was written for IDEs prior to 1.0. The error should tell you to replace Serial.print(val, BYTE) with Serial.write(val). So replace
Code: [Select]
Serial.print(byteGPS, BYTE);
with
Code: [Select]
Serial.write(byteGPS);

This question is asked and answered frequently, and is also explained in the IDE release notes.

pylon

The allowed values there are BIN, OCT, DEC, HEX. It's just the base that should be used to display the number. Use one that's OK for you from the list given.

dxw00d

#3
May 15, 2012, 11:12 am Last Edit: May 15, 2012, 11:17 am by dxw00d Reason: 1
Except in previous versions of the IDE, where BYTE was used to prevent any conversion, and simply send the binary data, which is what Serial.write() does.

marta

When I write this:
Code: [Select]
Serial.write(byteGPS);
program compiles, but i don't have any response from gps.

And when I tried with DEC.... the error is the same.

PaulS

Quote
When I write this

Well, we have no idea how you typed byteGPS, or how you valued it, or where you are calling that function. So, you're on your own.

Quote
And when I tried with DEC.... the error is the same.

When you tried what with DEC? What error is the same as what?

marta

I should start with another question: do I need to configure gps via GPS Viewer Software first?

PaulS

Quote
I should start with another question

So will I then. Do you have a link to this mysterious GPS?


PaulS

Quote
do I need to configure gps via GPS Viewer Software first?

If you do, you'll have a known configuration for the Arduino to deal with. I'd say that is a good thing.

Go Up