Using GPS with AlaMode

We included a header for the UP501 GPS module on AlaMode.
The UP501 is popular, and has the additional advantage of having a PPS output which can be used to do ultra-precise timing.

Unfortunately we made a little mistake and reversed the silkscreen on the connector (documented in this forum article.) The actual orientation is actually quite logical the RX pin of the GPS lines up with the corner of the AlaMode.

Mikal Hart wrote a wonderful GPS library called TinyGPS

The GPS library doesn’t actually talk to the GPS module, but parses the output (NMEA statements) In this case, our example code uses the SoftwareSerial library (also by Mikal Hart!) to listen for the output and feed it to the GPS library.

The pins used in AlaMode are 6 (receive on the Arduino, output from the GPS), and 4 (Transmit on Arduino, input into the GPS module.) Note you shouldn’t actually write to the GPS module from the Arduino, as it’s a 3V module, and the Arduino’s outputs are 5V. It is, however safe to read.

SoftwareSerial nss(6, 4);

also in the setup() function initalize the SoftwareSerial for 9600 baud:


After that, you are good to go! Stay tuned, in a future post, we’ll have a guest blogger who will be using the GPS feature of AlaMode to build a compact WarDriving module.

Here’s a copy of the GPS example code, pre-edited for use with AlaMode: