Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18089

Re: Is there any gps breakout board or shield that work with intel galileo ?

$
0
0

Hi again,

 

I have now managed to hook up a GPS module to the Galileo board and get some meaningful data out of it with minimal code changes.

 

I have connected the GPS UART pins to Arduino Pin 0 and Pin 1 on the Galileo, and simply powered it from the 5 V pin and two GND connections as specified in the GPS data sheet. I'm using an older Global Sat EM-406A module with a SiRF StarIII chipset (https://www.sparkfun.com/products/retired/465) but newer modules work the same way.

 

I'm using the TinyGPS library for Arduino (mikalhart/TinyGPS · GitHub) and the "Simple Test" example code that comes with the library.

 

To get it up and running on the Galileo a few changes are needed to the code:

- In the example sketch, you need to remove the #include <SoftwareSerial.h>, remove the "ss" object initialization and change all occurrences of "ss" to "Serial1" (it's not that many)

- Also, in the TinyGPS.cpp file (from the library), you need to comment out (or fix if you are ambitious ;-)) a few lines in two functions. I simply commented out the complete content of the following two functions and had them "return 0" to not do too much harm if the functions was called. It's TinyGPS::distance_between(...) starting on line 296 and TinyGPS::course_to(...) starting on line 321. The problem is that the functions radians(...) and degrees(...) isn't found and it gives a compile error. I didn't need these two functions for my test, so this was the easy fix.

 

This is actually all. After uploading the sketch to the Galileo, you can open the terminal in the Arduino IDE and see the debug output.

 

If you see lines like "CHARS=104 SENTENCES=0 CSUM ERR=0", it's because it doesn't have a fix yet

If you see lines like "** No characters received from GPS: check wiring **" you have probably crossed the UART lines

 

If you want to use a shield instead of hooking up the wires directly, any shield that have or can be configured to have the GPS connection on Arduino Pin 0 and Pin 1 should work.

 

/Thomas


Viewing all articles
Browse latest Browse all 18089

Trending Articles