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.

IntermediateProtip8,122
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

bigboystoys13

10 projects • 35 followers

Comments