NodeMCU ESP8266 12e With GPS & OLED Display

47,772

73

24

EZtech electronics

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

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

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.

3 People Made This Project!

Recommendations

  • Faux-Real Contest

    Faux-Real Contest
  • Warm and Fuzzy Contest

    Warm and Fuzzy Contest
  • Epilog X Contest

    Epilog X Contest

24 Discussions

0
None
vmed

Tip 9 days ago

Hi, how can I set the correct time? It gives me one hour less

0
None
iamchinnapat

2 years ago

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

image.jpeg
4 replies
0
None
vmediamchinnapat

Reply 10 days ago

The same thing happens to me, everything works even when the gps flashes, but no value works on the display. I have tried changing digital pins even with an arduino one in its corresponding TX and RX

0
None
RicardoS216Conor M

Reply 10 months ago

Tthere is a problem in instructions about TX and RX connections, TX in GPS must be conected to D7, and RX in GPS must be conected to D6.

0
None
ramgrandhi

Question 2 months ago

Thanks for the write-up. I just blew up my d1 mini :(

Keeping it aside, may i have the link to Github codefile you were referin gto?

0
None
AdeyemiA7

7 months ago

Please how do I know my GPS module is working put it out for several hours but not blinking LED to show its tracked satellite even though it prints on my serial terminal NMEA sentence with a lot of commas I tried boosting the battery power on the module but put the voltage on the wrong pin still printing NMEA sentence with a lot of commas

0
None
RicardoS216

10 months ago

Hello, I´m doing everything, step by step, but when I´m finishing compilation, I got this error:

collect2.exe: error: ld returned 1 exit status

Could you help me?, thanks.

1 reply
0
None
RicardoS216RicardoS216

Reply 10 months ago

I resolved the problem reported, it was about library incomplete, the program compiles very well. But, there is a problem in instructions about TX and RX connections, TX in GPS must be conected to D7, and RX in GPS must be conected to D6. Thanks so much for the project and information published, it was so usefull.

0
None
Jana Shree

10 months ago

When I use tinygps library i am getting this in my serial monitor please do help

I have surfed net and done many things but i could not correct it

ets Jan 8 2013,rst cause:4, boot mode:(1,7)

wdt reset

0
None
RAJXDAVIEL

1 year ago

can i add a sd card to log the data

0
None
Electorials

1 year ago

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

0
None
lcseh

1 year ago

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... :-)

0
None
andymenon

1 year ago

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?

0
None
jgreusel1

2 years ago

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

0
None
jgreusel1

2 years ago

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.

0
None
AgnibhaK

2 years ago

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

0
None
gazman321

2 years ago

Great Intractable, thanks.

Could you share the arduino.ino file please?

1 reply