Help needed for ESP8266, GPS neo6m and Firebase

  • Good day all,
    I'm trying to upload the GPS neo-6m data to the firebase realtime database through the ESP8266 wifi module. but, after I uploaded the code nothing happen to the firebase and I can't find the latitude and longitude in the firebase.
    can you please have a look at my code, please? I didn't receive any error messages when I uploaded the code.

    #include <TinyGPS++.h>
    #include <SoftwareSerial.h>
    #include <ESP8266WiFi.h>
    #include <FirebaseArduino.h>
    #include <ArduinoJson.h>
    #define FIREBASE_HOST 
    #define FIREBASE_AUTH 
    #define WIFI_SSID 
    #define WIFI_PASSWORD
    static const int RXPin =0, TXPin =2;
    static const uint32_t GPSBaud = 9600;
    TinyGPSPlus gps;
    // The serial connection to the GPS device
    SoftwareSerial ss(RXPin, TXPin);
    void setup() {
      // connect to wifi.
      while (WiFi.status() != WL_CONNECTED) {
      Serial.print("connected: ");
      Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
    void loop() {
     while (ss.available() > 0){
        if (gps.location.isUpdated()){
          Serial.print("Latitude= ");
          Serial.print(, 6);
          Firebase.pushString("/lat", "sd");
          Serial.print(" Longitude= ");
         Serial.println(gps.location.lng(), 6);
         Firebase.pushString("/lng", "sd");

  • @Sara , are you able to see the Latitude and longitude on the Serial Monitor ? and are you getting any error or something?

  • @salmanfaris yes I can see the latitude and longitude on the serial monitor and when I used them on the google map I can see my house. Also, there are no error messages received.

  • @Sara try this code.

    #include <WiFi.h> // esp32 library
    #include <IOXhop_FirebaseESP32.h>  // firebase library
    #define FIREBASE_HOST ""// the project name address from firebase id
    #define FIREBASE_AUTH "Your Firebase secret key" // the secret key generated from firebase
    #define WIFI_SSID "Your SSID"  // input your home or public wifi name
    #define WIFI_PASSWORD "Your Passcode"   //password of wifi ssid
    String fireStatus = ""; // led status received from firebase
    void setup() {
      WiFi.begin(WIFI_SSID, WIFI_PASSWORD); //try to connect with wifi
      Serial.print("Connecting to ");
      while (WiFi.status() != WL_CONNECTED) {
      Serial.print("Connected to ");
      Serial.print("IP Address is : ");
      Serial.println(WiFi.localIP());      //print local IP address
      Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);   // connect to firebase
      Firebase.setString("Your feedname", "your value");     //send initial string of led status

  • @kowshik1729 I received this error message

    Arduino: 1.8.12 (Windows Store (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), 2, v2 Lower Memory, Serial, None, Only Sketch, 115200"

    sketch_mar22b:3:55: fatal error: IOXhop_FirebaseESP32.h: No such file or directory

    #include <IOXhop_FirebaseESP32.h> // firebase library


    compilation terminated.

    exit status 1
    IOXhop_FirebaseESP32.h: No such file or directory

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • @Sara Go to this site. Download the zip file.

    Go to your sketch in Arduino IDE -> include .ZIP library -> browse and select your zip file. This will install your library.

    Then try compiling your code.

  • @kowshik1729 still I'm receiving error messages. I think because the esp is different from the esp that mentioned in the code.

  • Yeah, I knew that. Typically ESP8266 can compile most of the codes of ESP32. That's why I asked to compile it once. I will get back to you with one more option.

  • @Sara

    Please try the instructions here step by step and try it.

  • @kowshik1729 I already did the same steps previously with no result.

Log in to reply

Recent Posts

  • What are objects?

    Jeff Goodell: Would you explain, in simple terms, exactly what object-oriented software is?

    Steve Jobs: Objects are like people. They’re living, breathing things that have knowledge inside them about how to do things and have memory inside them so they can remember things. And rather than interacting with them at a very low level, you interact with them at a very high level of abstraction, like we’re doing right here.

    Here’s an example: If I’m your laundry object, you can give me your dirty clothes and send me a message that says, “Can you get my clothes laundered, please.” I happen to know where the best laundry place in San Francisco is. And I speak English, and I have dollars in my pockets. So I go out and hail a taxicab and tell the driver to take me to this place in San Francisco. I go get your clothes laundered, I jump back in the cab, I get back here. I give you your clean clothes and say, “Here are your clean clothes.”

    You have no idea how I did that. You have no knowledge of the laundry place. Maybe you speak French, and you can’t even hail a taxi. You can’t pay for one, you don’t have dollars in your pocket. Yet I knew how to do all of that. And you didn’t have to know any of it. All that complexity was hidden inside of me, and we were able to interact at a very high level of abstraction. That’s what objects are. They encapsulate complexity, and the interfaces to that complexity are high level.

    read more
  • This webinar is focussing on learning Git VCS, a distributed version control system for tracking changes during practical software development.

    We will be exploring the usage of various git commands, plugins/extensions and branching-models based on real-world contexts.

    The session is targetting absolute beginners with minimum or no experience with git, But a mindset to optimize and improve work efficiency and productivity by learning and exploring new tool-chains and strategies is a must!

    Join MakerChat.

    Maker: Muhammad Swalah
    Place: Zoom
    Date: 16th Aug 2020
    Time: 8:00 PM


    Join MakerGram:


    read more
  • 3D PRINTING@300x.png

    read more
  • MakerGram is Live Now!

    MakerChat 0x07: How to Learn Machine Learning (for Humans) by @GKS

    Watch LIVE @

    #MakerGramLearnings #MGLive #AI #ArtificialIntelligence #MachineLearning #Humans #MachineIntellegence #MakerChat

    read more
  • @anuradhasingh426 Please check your mailbox.

    read more