MakerGram Logo

    MakerGram

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups

    Help needed for ESP8266, GPS neo6m and Firebase

    Arduino
    4
    11
    2410
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sara last edited by salmanfaris

      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() {
         Serial.begin(9600);  
      
        // connect to wifi.
        WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
        Serial.print("connecting");
        while (WiFi.status() != WL_CONNECTED) {
          Serial.print(".");
          delay(500);
        }
        Serial.println();
        Serial.print("connected: ");
        Serial.println(WiFi.localIP());
        
        Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
        Serial.begin(9600);
      ss.begin(GPSBaud);
       //Serial.println("a");
      }
      
        
      void loop() {
      
       while (ss.available() > 0){
      
          gps.encode(ss.read());
      
          if (gps.location.isUpdated()){
            
            Serial.print("Latitude= ");
            Serial.print(gps.location.lat(), 6);
            Firebase.pushString("/lat", "sd");
      
            Serial.print(" Longitude= ");
           Serial.println(gps.location.lng(), 6);
           Firebase.pushString("/lng", "sd");
          }
      
      
       }}
      
      salmanfaris 1 Reply Last reply Reply Quote 0
      • salmanfaris
        salmanfaris @Sara last edited by

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

        S 1 Reply Last reply Reply Quote 0
        • S
          Sara @salmanfaris last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • kowshik1729
            kowshik1729 last edited by kowshik1729

            @Sara try this code.

            #include <WiFi.h> // esp32 library
            
            #include <IOXhop_FirebaseESP32.h>  // firebase library
            
            #define FIREBASE_HOST "led-control-4631d.firebaseio.com"// 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() {
            
              Serial.begin(9600);
            
              delay(1000);
                       
            
              WiFi.begin(WIFI_SSID, WIFI_PASSWORD); //try to connect with wifi
            
              Serial.print("Connecting to ");
            
              Serial.print(WIFI_SSID);
            
              while (WiFi.status() != WL_CONNECTED) {
            
                Serial.print(".");
            
                delay(500);
            
              }
            
              Serial.println();
            
              Serial.print("Connected to ");
            
              Serial.println(WIFI_SSID);
            
              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
            
            }
            
            S 1 Reply Last reply Reply Quote 0
            • S
              Sara @kowshik1729 last edited by

              @kowshik1729 I received this error message

              Arduino: 1.8.12 (Windows Store 1.8.33.0) (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.

              1 Reply Last reply Reply Quote 0
              • kowshik1729
                kowshik1729 last edited by

                @Sara https://github.com/ioxhop/IOXhop_FirebaseESP32 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.

                S 1 Reply Last reply Reply Quote 0
                • S
                  Sara @kowshik1729 last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • kowshik1729
                    kowshik1729 last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • kowshik1729
                      kowshik1729 last edited by

                      @Sara https://www.instructables.com/id/Esp8266-Firebase-Connection/

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

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        Sara @kowshik1729 last edited by

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

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Recent Posts

                        • O

                          The Yankees might attain a necessary pitching reinforcement towards commence the calendar year with straight rotator cuff tendinitis, Clarke Schmidt intended his instant rehab start out for Double-A Somerset upon April 10, tossing 4 scoreless innings with 4 strikeouts, no walks and 4 hits permitted. He threw 61 pitches, 45 of them getting me, it simply above turning out to be back again within that video game come to feel and the aggressive spirit, Schmidt explained soon after his outing. pitching a very little in another way inside of choice counts, blending and matching and using artistic out was a single of the 3 projected Yankees starters who ended up befelled through destruction ahead of the month to month time begun. Yankees ace Gerrit Cole underwent period-finishing Tommy John surgical procedures inside mid-March, though reigning AL Newbie of the 12 months champion Luis Gil is sidelined with a specifically lat anxiety. Schmidt afterwards connected them upon the hurt record Though he felt his shoulder bark and was scratched in opposition to his March 16 Grapefruit League start was Clarke's instant rehab begin with the Patriots as soon as he struck out 7 earlier mentioned 3 1/3 scoreless innings upon 52 pitches for Somerset upon April 5 https://www.nyyankeesprostore.com/Jacoby_Ellsbury_Jersey-28
                          . Yankees supervisor Aaron Boone mentioned upon April 5 that they predicted just before this getting Schmidt's ultimate commence rejoining the significant league rotation upon April 15 or 16 vs. Kansas Metropolis. Schmidt reiterated just after his minute start out that the expect was in the direction of return this foreseeable future 7 experienced a 2 https://www.nyyankeesprostore.com/Alex_Rodriguez_Jersey-9
                          . 85 Technology with 93 strikeouts inside 85 1/3 innings for the Yankees closing period. The specifically-hander neglected 3 1/2 weeks inside 2024 thanks toward a straight lat anxiety prior to returning inside early September and creating 3 begins inside the playoffs, which includes Activity 3 of the Entire world Max Fried, Carlos Rodn and Marcus Stroman in all probability penciled into the rotation for the Yanks, Schmidt's return will stress a alternative between Carlos Carrasco and Will Warren, the latter of whom is made up of Tiny League Programs becoming.

                          https://www.nyyankeesprostore.com

                          • read more
                        • @codelery Awesome. That's great news. Kudos to @rafitc99 . 🙌

                          @codelery Please keep us updated about your project, looking forward to seeing it in action 🤩

                          • read more
                        • C

                          @rafitc99 I changed the buffer and that solved the problem. Thanks a lot for coming to my rescue.

                          • read more
                        • C

                          @salmanfaris I did change the buffer size and everything is working perfectly. Thanks coming to my rescue.

                          • read more
                        • @codelery said in Help needed: Arduino Wireless Notice Board project:

                          I am using the hardware serial (pin 0 and 1 on Arduino Uno)

                          As @rafitc99 mentioned, you need to expand the Serila buffer, in the hardware serial also the Arduino board package implements a 64-byte ring buffer for send and receive on the hardware serial messages. So you need to change that to 256 as per your message length.

                          • read more
                        By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
                        Copyright © 2023 MakerGram, All rights reserved.
                        Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct