Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: GPS with XBee
PostPosted: Wed May 09, 2012 2:09 pm 

Joined: Tue Mar 20, 2012 12:58 pm
Posts: 17
Hello Libelium:

XBee need to receive GPS data. First I took the example code in the IDE Getting GPS Coordinates Waspmote ------ -------- Example and everything works fine, I can read Waspmote gps data via USB.

Next, I tried to receive GPS data through the GATEWAY with XBee. For this I used this code:

void setup()
{
// Inits the XBee 802.15.4 library
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);

// Powers XBee
xbee802.ON();
// setup the GPS module
XBee.println("----- Setting up GPS ------");

GPS.ON();

// waiting for GPS is connected to satellites
while( !GPS.check() )
{
delay(1000);
XBee.print(".");
}

XBee.println("\nConnected");

}
void loop(){

// Getting Time
GPS.getPosition();
XBee.println("---------------");
XBee.print("Time: ");
XBee.println(GPS.timeGPS);
XBee.print("Date: ");
XBee.println(GPS.dateGPS);
XBee.print("Latitude: ");
XBee.println(GPS.latitude);
XBee.print("Longitude: ");
XBee.println(GPS.longitude);
XBee.print("Altitude: ");
XBee.println(GPS.altitude);
XBee.print("Speed: ");
XBee.println(GPS.speed);
XBee.print("Course: ");
XBee.println(GPS.course);
XBee.println("---------------");
}


But there is something I'm not turning because I still receive the data by GATEWAY. I hope you can tell me I'm wrong. Thank you.


Top
 Profile  
 
 Post subject: Re: GPS with XBee
PostPosted: Thu May 10, 2012 10:43 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi chusty_09 ,

I'm not sure to have understood your problem. You are trying to receive the GPS data in your PC via XBee, isn't it? We have tested your code and it works, and you mention in your last sentence that you do receive it. What is exactly your problem?

Regards.


Top
 Profile  
 
 Post subject: Re: GPS with XBee
PostPosted: Thu May 10, 2012 1:53 pm 

Joined: Tue Mar 20, 2012 12:58 pm
Posts: 17
hello Libelium:

I've already solved, it was receiving data through the gateway, I created a new code and I will correct.

I would also like to know where I can find more information about XBee 802, because the manual only bring a few instructions and let me know where I can find out more.


Top
 Profile  
 
 Post subject: Re: GPS with XBee
PostPosted: Thu May 10, 2012 4:47 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
chusty_09,

Besides that 802.15.4 programming guide, you can take a look into Digi's website (Xbee manufacturer) there you can find specific manuals and AT commands to communicate directly with Xbee module.

Regards...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use