I am currently try to upload this code into my NodeMCU ESP8266 with GPS Flight Module. My purpose is to set the NodeMCU to sent longitude and latitude data directly into my firebase to create a real-time tracking device. Currently it shows errors of Multiple libraries were found for (All libraries included). Please help me as i find no answer for this issues.
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
static const int RXPin = D6, TXPin = D7; //TX //RX
static const uint32_t GPSBaud = 9600;
// masukkan ssid dan password hotspot
const char* ssid = "xxxxxxxxxxxxxx";
const char* password = "xxxxxxxxxxxxx";
#define FIREBASE_HOST "xxxxxxxxxxxxxxxxx"
#define FIREBASE_AUTH "xxxxxxxxxxxxxxxx"
TinyGPSPlus gps;
WiFiClient client;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
void setup()
{
Serial.begin(115200);
ss.begin(GPSBaud);
Serial.println(F("Testing GPS1 "));
Serial.println(F("Testing GPS 2"));
Serial.print(F("Testing GPS 3 ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
Serial.print("Netmask: ");
Serial.println(WiFi.subnetMask());
Serial.print("Gateway: ");
Serial.println(WiFi.gatewayIP());
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}
void loop()
{
//--------------------------------------------------------------------------------------
// This sketch displays information every time a new sentence is correctly encoded.
while (ss.available() > 0)
if (gps.encode(ss.read()))
//-------------------------------------------------------------------------------------
displayInfo();
//-------------------------------------------------------------------------------------
if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
while(true);
}
}
//--------------------------------------------------------------------------------------
void displayInfo()
{
// Serial.print(F("Location: "));
if (gps.location.isValid())
{
double latitude = (gps.location.lat());
double longitude = (gps.location.lng());
double speedy = (gps.speed.kmph());
String latbuf;
latbuf += (String(latitude, 6));
Serial.println(latbuf);
String lonbuf;
lonbuf += (String(longitude, 6));
Serial.println(lonbuf);
String speedybuf;
speedybuf += (String(speedy, 2));
Serial.println(speedybuf);
if(speedy>70){
}
// update value
Firebase.setFloat("Latitude", latitude);
// handle error
if (Firebase.failed()) {
Serial.print("setting latitude failed:");
Serial.println(Firebase.error());
return;
}
Firebase.setFloat("Longitude", longitude);
// handle error
if (Firebase.failed()) {
Serial.print("setting longitude failed:");
Serial.println(Firebase.error());
return;
}
Firebase.setFloat("Speed", speedy);
// handle error
if (Firebase.failed()) {
Serial.print("setting speed failed:");
Serial.println(Firebase.error());
return;
}
delay(1000);
}
else
{
Serial.print(F("INVALID"));
}
Serial.println();
}
[error]
Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Multiple libraries were found for "SoftwareSerial.h"
In file included from C:\Users\Mariana\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22:0,
Used: C:\Users\Mariana\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\libraries\SoftwareSerial
Multiple libraries were found for "ESP8266WiFi.h"
from C:\Users\Mariana\Documents\Arduino\sketch_nov13a\sketch_nov13a.ino:4:
Used: C:\Users\Mariana\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\libraries\ESP8266WiFi
C:\Users\Mariana\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:26:25: fatal error: ArduinoJson.h: No such file or directory
Multiple libraries were found for "FirebaseArduino.h"
#include <ArduinoJson.h>
Used: C:\Users\Mariana\Documents\Arduino\libraries\firebase-arduino-master
^
Multiple libraries were found for "TinyGPS++.h"
compilation terminated.
Used: C:\Users\Mariana\Documents\Arduino\libraries\TinyGPSPlus-master
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
[/error]