Skip to content

Instantly share code, notes, and snippets.

@houmei
Created June 19, 2014 15:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
GPS module GM318B sample / with Crowduino(3.3V)+Grove Shield
// http://www.aitendo.com/product/1007
// GPS module GM318B test
// Crowduino-3.3V + GroveShield
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println("+++ GPS module GM318B +++");
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment