Help using my gps with javelin
claym53
Posts: 36
I bought a javelin chip (http://www.parallax.com/detail.asp?product_id=JS1-IC), a mini-ABB board to put it on (http://www.lynxmotion.com/Category.aspx?CategoryID=66) and a gps module from parallax (http://www.parallax.com/detail.asp?product_id=28146).
I'm trying to read in the gps coordinates so I can work with them in my java program. From what I've read of the gps documentation and the javelin manual, I think I need to use the Uart VP to send the·hex codes to the gps module and then recieve what·comes back.
So if someone could get me started with some·code, I would be very gratefull.
Please help A.S.A.P!
I'm trying to read in the gps coordinates so I can work with them in my java program. From what I've read of the gps documentation and the javelin manual, I think I need to use the Uart VP to send the·hex codes to the gps module and then recieve what·comes back.
So if someone could get me started with some·code, I would be very gratefull.
Please help A.S.A.P!
Comments
regards peter
Post Edited (Peter Verkaik) : 12/8/2006 9:16:41 AM GMT
and put the attachement from above post in it.
In your application prgram put
import stamp.peripheral.gps.*;
import stamp.core.*;
static Uart sio = new Uart(Uart.dirReceive,CPU.pin0,Uart.dontInvert,Uart.speed4800,Uart.stop1);
static GPS_Parallax mygps = new GPS_Parallax(sio,0);
then you can use mygps.getValid() and other public methods from class GPS_Parallax.
regards peter
that compiles ok.
Put it in the projects folder.
regards peter
any ideas?
then you must have a folder
c:\Program Files\Parallax Inc\Javelin Stamp IDE\lib\stamp\peripheral\gps\
in which you place GPS_Parallax.java
and a folder
c:\Program Files\Parallax Inc\Javelin Stamp IDE\Projects\
in which you place gps_test.java
Use capital and small print letters EXACTLY as above.
The error you get suggests there is no Uart.java class
in folder ...\lib\stamp\core\
If it is not there, I suggest you reinstall the Javelin IDE program.
regards peter
· //public results for fast access (read only)
· public int hours,minutes,seconds;
· public int day,month,year;
· public int latDegrees,latMinutes,latFracmin,latDirection;
· public int lngDegrees,lngMinutes,lngFracmin,lngDirection;
You can access these values using mygps.hours etc.
I could have defined methods that return those values
but that would only take additional·codespace.
Just don't assign values·to these variables.
regards peter