Arduino GPS distance meter

Help me by sharing this post


PREVIOUS PART       NEXT TUTORIAL

PART 5 - Code

Ok, for the code, make sure you downlaod and install the TinyGPS library as well. We need taht for the GPS module. For the GPS module we use the software serial defined on pins 4 and 3 for rx and tx. The TFT display sues the normal serial pins which are 0 and 1. You also need to uplaod a new TFT file to the display using and SD card.



#include <SoftwareSerial.h>
#include <TinyGPS.h>
/* This sample code demonstrates the normal use of a TinyGPS object.
   It requires the use of SoftwareSerial, and assumes that you have a
   4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).*/
TinyGPS gps;
SoftwareSerial ss(4, 3);

GPS module Arduino altitude

Upload the code and power up the devide. Go outside adn wait for satelites. You can see the amount of satelites on the right top cornder and also the battery level. Press distance and get START coordinates. Move around and press calculate and it will give you the difference in "m". The same goes for altitude.





PREVIOUS PART       NEXT TUTORIAL

Help me by sharing this post












yt_link
insta_link
fb_link
twitter_link

GPS distance
page 2/2



ADVERTISERS

PCBWAY PCB service

PCBWAY PCB service





Curso Arduino Online nivel Intermedio