Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Hackster is hosting Impact Spotlights: Smart Home. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Smart Home. Stream on Thursday!
bigboystoys13
Published

DIYmall GPRS/GPS SIM908 Module - NMEA Data

Directions on how to setup your DIYmall GPRS/GPS SIM908 Module so that you can get GPS / NMEA data from it.

IntermediateProtip10,782
DIYmall GPRS/GPS SIM908 Module - NMEA Data

Things used in this project

Story

Read more

Code

Arduino UNO

C/C++
Sets the unit to transmit NMEA data, then feeds that data back to the computer.
#include <SoftwareSerial.h>

SoftwareSerial mySerialGPRS (2,3); // RX, TX
SoftwareSerial mySerialGPS(4,5); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  mySerialGPRS.begin(57600);
  mySerialGPRS.println("AT");
  delay(100);
  mySerialGPRS.println("AT+CGPSPWR=1");
  delay(100);
  mySerialGPRS.println("AT+CGPSRST=1");
  delay(100);
  mySerialGPRS.println("AT+CGPSIPR=19200");
  delay(100);
  mySerialGPRS.println("AT+CGPSOUT=255"); // Enable NMEA output 255
  delay(100);
  // Clear out anything in GPRS
  while(mySerialGPRS.available())
  {
    mySerialGPRS.read();
  }
  mySerialGPS.begin(19200);  //NMEA connection
  Serial.begin(57600); // Start serial connection with computer
}

void loop() // Send NMEA data to computer
{
  if (Serial.available())
  {
    mySerialGPS.write(Serial.read());
  } 

 if (mySerialGPS.available())
  {
    Serial.write(mySerialGPS.read());
  }
 }

Credits

bigboystoys13
11 projects • 46 followers
Contact

Comments

Please log in or sign up to comment.