Close
0%
0%

Building a GPS tracker from scratch

Building a gps tracker from scratch using neo 6m module, esp8266, nodejs, mongodb and EJS (embedded javascript) templates

Public Chat
Similar projects worth following
761 views
This is an extension to my previous project that I built to record GPS data using thingspeak cloud. The problem with Thingspeak cloud is the delay time that it enforces before a new data is updated. In this Project, I designed and developed everything from scratched.

Video covers complete instructions.

Below are the topics that I covered here.:

1. Introduction
2. Tech Stack Overview
3. Architecture
4. Installations Overview 

  1. Arduino
  2. ESP8266 Libraries
  3. Arduino Json and HTTP client library installation and version
  4. Mongodb 
  5. Nodejs
  6. NPM
  7. VS code

5. Creating a Webserver using nodejs, ejs and mongodb.

6. Create api to accept data from IoT device.
7. Exposing end point url using ngrok.
8. Testing the API using postman.
9. GPS and Wemos device connection
10. Programming wemos device
11. Sending data from wemos to backend server

  • 1 × neo 6m GPS module
  • 1 × Wemos d1 Mini
  • 1 × One to One connectors
  • 1 × Micro USB cable

  • 1
    Running Webserver Code

    Steps to run the webserver code:

    1. Clone this repository either by downloading it or by using git clone.
      git clone https://github.com/vikkey321/--Build-a-GPS-tracker-using-Neo-6m-Module--ESP8266--nodejs--mongodb-and-EJS- 
    2. Extract the folder and navigate inside the code
      CD Extracted_folder_name 
    3. Now, edit the map api in map.ejs in the views folder and paste your goole maps javascript api key.
      src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=&v=weekly"
      
    4. Install the libraries
      npm install 
    5. Install nodemon
      npm install nodemon
      
    6. Start the server (Also make sure that your mongodb is running in the background)
      npm start
      
    7. Your webserver is running on 3000 port
      localhost:3000
      


  • 2
    Editing Arduino code

    Steps to edit arduino code:

    1. You can find the code in the folder "arduino_code".
    2. Replace your SSID and Password with your wifi name and password
      #define STASSID "SSID"
      #define STAPSK  "PWD"
      
    3. Replace the ngrok url in the below lines
      const char* host = "YOUR_ngrok_url
      http.begin("YOUR_ngrok_url/addgpsdata");
      
    4. Directly program your arduino board

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates