Poll
Question: how to connect to gps?
venus gps 3.3 - 0 (0%)
arduino uno - 2 (100%)
Total Voters: 2

Pages: [1]   Go Down
Author Topic: arduino uno - venus gps 3.3  (Read 1940 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Serial.print(byteGPS, BYTE);
with
Code:
Serial.write(byteGPS);

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

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 15, 2012, 04:17:10 am by dxw00d » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I write this:
Code:
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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I should start with another question
So will I then. Do you have a link to this mysterious GPS?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.sparkfun.com/products/10921
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: