This is an old revision of the document!
This is an unassembled kit and requires basic soldering. This is designed for use with the Digispark development board, which is not included.
| Part | Quantity | Identification |
|---|---|---|
| Pro Combo PCB | 1 | |
| Serial GPS Module | 1 | |
| 1x40pin male 0.1“ pitch header | 25 pins worth | |
Resistor Values: For more information on how to identify the value of the resistors we recommend these sites: A nice simple resistor calculator: http://www.ealnet.com/m-eal/resistor/resistor.htm A comprehensive article on identification: http://www.diyaudioandvideo.com/Electronics/Color/
Soldering: If you are new to soldering we recommend the following tutorials: Soldering Basics (http://www.sparkfun.com/tutorials/106) and Soldering Crash Course from the folks at Sparkfun (http://www.sparkfun.com/tutorials/354). How to solder from the Curious Inventor: http://store.curiousinventor.com/guides/How_to_Solder
Adafruit has this excellent guide that starts with the tools needed and then shows detailed pictures, including some of the common problems that beginners experience (http://learn.adafruit.com/adafruit-guide-excellent-soldering)
We assume for these assembly instructions that you know the basics of thru-hole soldering. If you don't check out the links above, these boards are very easy to solder - we promise!
Cut two lengths of male headers each 9 pins long and one 3 pins long. Insert into corresponding positions (on the bottom of the board) and solder each pin.
Tip: Inserting the headers into a breadboard and then placing the board on top can make this process easier.
Note: If you are using stackable headers, use them here instead of the standard male headers.
Insert a strip of 4 header pins into the top of the board in the four holes labeled for the GPS module. Solder on the bottom of the board.
Insert the GPS module into the front of the board onto the 4 pins. Solder the pins to the module, optionally snip off the excess.
Sketch below is a work in progress!
#include <DigiCDC.h>
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
char tempBuffer[15];
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available()){
char rxData = Serial.read();
// Start of frame
if (rxData == '$') {
// Read next chars
ReadSerialToComma();
// Check if GPRMC
if (memcmp(tempBuffer, "GPRMC", 5) == 0) {
ReadSerialToComma(); // Timestamp
//buffer has time right now
SerialUSB.println(tempBuffer);
ReadSerialToComma(); // Validity
// If valid GPS data
if (tempBuffer[0] == 'A') {
ReadSerialToComma(); // Latitude
//buffer has lat right now
SerialUSB.println(tempBuffer);
ReadSerialToComma(); // N or S (ignore because I know what it's going to be, you should check this)
ReadSerialToComma(); // Longitude
//buffer has lon right now
SerialUSB.println(tempBuffer);
ReadSerialToComma(); // W or E (ignore because I know what it's going to be, you should check this)
ReadSerialToComma(); // Speed in knots
//buffer has speed right now
SerialUSB.println(tempBuffer);
ReadSerialToComma(); // Date
//buffer has date right now
SerialUSB.println(tempBuffer);
SerialUSB.delay(1000); //wait 1 second before fetching again
}
}
}
}
SerialUSB.refresh();
}
byte ReadSerialToComma(void) {
int x = 0;
tempBuffer[x] = Serial.read();
while (tempBuffer[x] != ',') {
x++;
tempBuffer[x] = Serial.read();
SerialUSB.refresh();
}
x++;
tempBuffer[x] = 0;
return x;
}