Simple Arduino GPS With OLED




Introduction: Simple Arduino GPS With OLED

This small project demonstrates how to build a simple GPS-receiver from an Arduino-board (or similar), an OLED-display and a GPS-module with antenna.

Step 1: Collecting the Parts

Step 2: Connecting the Display

Use 4 jumper wires to connect the display to the Arduino board.

This is very straightforward:

5V -> VIN


SDA -> SDA (I2C-data)

SCL -> SCL (I2C-clock)

Install a small demo sketch on the Arduino, connect the battery and check, if the display does its jobs.

Step 3: Connencting the GPS Module

a) Mount the GPS-bee onto the Xbee breakout-board. The spacing of the 2mm headers of the bee is a little bit too small for regular jumper wires.

b) Plug the remaining 4 jumper wires into the TX, RX, 3.3V and GND sockets of the Arduino, as it is the case here, into 8 and 9.

SoftwareSerial is used to provide more than one serial interface, hence not the regular RX/TX pins are used. Instead in the sketch pin 8 is assigned as RX and pin 9 as TX:

in Code: SoftwareSerial softSerial(8, 9); // RX, TX

Then connect GND and GND, VIN to 3.3V (do not use 5V with the GPS bee), and TX to 8 (RX) and RX to 9 (TX). As always, swapping RX and TX on a serial port is confusing.

That's almost it, the system should work, except that very often satellites' reception indoors is poor.

Step 4: Getting the Signal

Finally the setup is ready to acquire some signals and translate them into coordinates. But before that the bits and pieces have to be wrapped up for some protection. Any water proof enclosure with some transparency for the display would do it. Some soft cushions might be of help.

Once all is set, any cozy place with sunshine, indicating an open sky, is suitable to determine its exact location.

The coordinates and other values are shown on the display:

The first 2 lines show latitude and longitude, every asterisk in the third line stands for a satellite used, only 3 here, the next line gives time and date (in UTC) and the last line indicates the altitude.

All these values are generated in code, and more values, like speed on ground, can be obtained from the GPS signals. The mileage may vary.

Step 5: Software


The software has been completely rewritten. None of the libraries I founds supports the GSV-sentences from, those one, who tells you where all the satellites are.



    • Metalworking Contest

      Metalworking Contest
    • Water Contest

      Water Contest
    • Fix It! Contest

      Fix It! Contest

    10 Discussions

    Hello again
    Tried with another arduino (no memory issues); tried with Tinysine OLED. Stuck with initial "Adafruit". Display never clears.
    And I get good GPS fix.

    2 replies

    just move the "

    GPS.callBack = updateGPSData;

    " from void setup() to void loop().

    it will no more stuck and run well!

    This approach is not advisable. The callback has only set before execution, not always while running 'loop()'.


    No mention of 8 and 9 in the code!

    I wrote software serial (8,9); but the sketch is stuck at the opening Adafruit!

    Any help?



    3 replies

    Pin 8 and 9 for SoftwareSerial are used only on boards with enough memory provided.

    The example code does not show it. There you have to use the pins for serial directly. It is in the comment:

    * Serial is occupied. It cannot be used for debugging here. * If you want to see the data on the screen of your computer, * please use the version without OLED.



    It is a memory issue, because The OLED's display memory is in the RAM.

    Please observe the outcome of your IDE. There you got a message about memory consumption of your board, hence whether or not you might want to use SoftwareSerial.

    Hi Dial
    Using your sketch with no changes the opening logo Adafruit gets stuck and nothing happens
    Thank you very much for your help

    Sounds like a memory issue. Look at your memory consumption.

    The sketch is very tight, for an original Arduino with 2k.

    Or a hardware issue. The splash screen is left before loop () starts.

    Evaluate this line: It depends on your hardware:

    display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)

    This is a standalone application.

    thank you, didn't have time to read all the instructable before. i got it now.
    nice work.