Introduction: NodeMCU ESP8266 12e With GPS & OLED Display

Picture of NodeMCU ESP8266 12e With GPS & OLED Display

In this Instructable I will describe how to hookup a Ublox 6m GPS module and an OLED display to the NodeMCU or ESP8266-12e wifi module to display your current GPS location and other info.

Check out my Youtube Video describing this. Youtube Video

Step 1: Ingredients - What You Will Need

In this Instructable I will describe how to hookup a Ublox 6m GPS module and an OLED display to the NodeMCU or ESP8266-12e wifi module to display your current GPS location and other info. With a little extra programming you could use it to broadcast your GPS location to the internet using the wifi on the esp8266, and upload it to ioadafruit or another MQTT cloud server. Maybe attach it to your dog a see where and how much he roams around the yard!

Step One: The ingredients

1. You'll need an ESP8266 - e12 wifi module

2. An OLED display ($5- $10 from Ebay)

3. A Ublox 6m GPS receiver or similiar model

4. A breadboard and some jumper wires

Step 2: Hooking It Up

Picture of Hooking It Up

1. First place the ESP8266 on a breadboard

2. Connect a jumper wire from the Ground and Output VCC of the ESP to the power and ground rails of the breadboard.

3. Connect the Ground and VCC of the GPS and the Oled Display to the power rails of the breadboard. Make sure Ground is to (Ground -) and VCC is to the (Red +)

4. Connect the SCL Pin of the Oled display to the ESP D1 pin (the Yellow wire in the picture), and connect the SDA Pin of the Oled display to D2 pin (the Blue wire in the picture) These are your I2C communication connections.

5. Connect the TX pin of the GPS to the D6 pin of the ESP (the Blue wire), and connect the RX pin of the GPS to the D7 pin of the ESP (the white wire) These are your Serial communication pins. You could choose just about any data pins you like, but you will also have to make the necessary changes in the code.

Here is a link to a pinout diagram of the ESP-12e Board to assist you.

Acrobotic Pinout

Step 3: Upload the Code

Picture of Upload the Code

First, I assume you have the Arduino IDE already installed (preferably 1.6.4 or later) and that you have installed all the necessary libraries such as: TinyGPS plus, Software Serial, and the Adafruit OLED display library. You can get these from Github.

If not, install the latest version of the Arduino IDE and the libraries first.

I also assume you have installed all the necessary drivers for your computer to recognize the ESP8266, if not Adafruit has an excellent tutorial here. Adafruit ESP8266 Tutorial This is crucial if this is your first time using the ESP8266

Next, go to github and download the code and run it in the Arduino IDE.

Enter your latitude and longitude into the area of code "Home_LAT =" and "Home_LNG=" below

Compile it and upload to your NodeMcu esp-12e, In the Arduino IDE be sure to select your correct board (ESP-12E Module in my case) and the Memory size - 4M(3M SPIFFS)

Go for a walk or drive and watch your GPS position update, remember to keep your eyes on the road.


iamchinnapat (author)2016-09-02

I used your code with my nodemcu and neo-m8n. It's can compile and upload but nothing happen.

Conor M (author)iamchinnapat2017-11-12

Same, everything works apart from the gps

RAJXDAVIEL (author)2017-10-29

can i add a sd card to log the data

Electorials (author)2017-10-25

Can this be used with an Arduino Uno, or is this project only compatible with the NodeMCU?

lcseh (author)2017-02-27

I have a hard time compiling this code, is there a way to publish it along with the libraries that you have used? I would be very grateful... :-)

andymenon (author)2017-01-30

A quick clarification - I'm working on something similar, but I need to roll with a different set of Pins for Tx and Rx as opposed to Pins 12 and 13 mentioned in your IBLE. Reason being, these 2 pins are already taken up by an SD Card reader on my ESP8266 12-E. But if I use a different set of Pins for my GPS, I can't seem to get it working. It works only with pins 12 and 13.

Any ideas on what other Pins on ESP8266 would work with the SoftwareSerial library?

jgreusel1 made it! (author)2016-11-19

Works great!

jgreusel1 (author)2016-11-18

I struggled with Adafruitssd1306syp.h but finally got. I had to download the individual elements from Github into a folder I created in libraries.

jgreusel1 (author)2016-11-16

Made some headway but I'm stuck on

C:\Users\John\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp:19:26: fatal error: avr/pgmspace.h: No such file or directory
#include <avr/pgmspace.h>
compilation terminated.

gcklaus made it! (author)2016-11-08

Thanks for the code, used it as a base for my own project.

AgnibhaK (author)2016-11-07

can we use any other gps module other than ublox 6m?

gazman321 (author)2016-05-29

Great Intractable, thanks.

Could you share the arduino.ino file please?

OUTATIME88 (author)gazman3212016-05-29

Thanks for the compliment gazman321, you can copy and paste the code from above or you can download it from GitHub here is the link.

Good Luck with the project!

gazman321 (author)OUTATIME882016-05-30

What OLED library did you install? Did you used the library manger to install?

I installed the 1306 library from the library manger, now i get compile errors.

Any help greatly appreciated.

OUTATIME88 (author)gazman3212016-05-30

This is the one I used from Github

It is named Adafruit_ssd1306syp in my libraries folder

gazman321 (author)OUTATIME882016-05-30

OK, Thanks, I'll keep trying.

The one that I have is called Adafruit_SSD1306, installed via the library manager.

breagan22 (author)2016-05-10


About This Instructable




Bio: EZtech electronics
More by OUTATIME88:NodeMCU Motion Activated Security SystemNational Data Buoy Center Weather DisplayESP8266 uploads GPS position to Adafruit IO
Add instructable to: