Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Arnov Sharma
Published © CC BY

GPS + Bluetooth + Android

I took an HC-05 and added it to my handheld GPS device to get coordinates on my Android tablet.

BeginnerShowcase (no instructions)1 hour19,984
GPS + Bluetooth + Android

Things used in this project

Hardware components

GPS Module (Generic)
UBLOX NEO6M
×1
UTSOURCE Electronic Parts
UTSOURCE Electronic Parts
everything above can be found here for a low price
×1
Arduino UNO
Arduino UNO
×1
JLCPCB Customized PCB
JLCPCB Customized PCB
×1

Story

Read more

Schematics

Schematics

Code

Code

C/C++
#include <TinyGPS++.h>
#include <SoftwareSerial.h>

static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup(){
  Serial.begin(9600);
  ss.begin(GPSBaud);
}

void loop(){
  // This sketch displays information every time a new sentence is correctly encoded.
  while (ss.available() > 0){
    gps.encode(ss.read());
    if (gps.location.isUpdated()){
      Serial.print("Latitude= "); 
      Serial.print(gps.location.lat(), 6);
      Serial.print(" Longitude= "); 
      Serial.println(gps.location.lng(), 6);
    }
  }
}

Credits

Arnov Sharma
310 projects • 311 followers
Just your average MAKER

Comments