Arduino + SIM800L Connect to Firebase

Asked

Viewed 191 times

0

Galley,

I’m putting together a project and I need to connect my companion to firebase. For this I am using a SIM800L, however my code return the error below in the compiler, someone has already gone through it or could help me?

Error: Compilation options changed, recompiling all In file included from C: Users ACER Desktop sketch_mar19a sketch_mar19a.Ino:7:0: C: Program Files (x86) Arduino Layouts firebase-Arduino-master src/Firebase. h:25:18: fatal error: memory: No such file or directory #include Compilation terminated. Exit status 1 Compile error for Arduino/Genuino Mega or Mega 2560 board

#include <ArduinoJson.h>

#include <Sim800l.h>

#include <TinyGPS.h>

#include <Firebase.h>
#include <FirebaseArduino.h>
#include <FirebaseCloudMessaging.h>
#include <FirebaseError.h>
#include <FirebaseHttpClient.h>
#include <FirebaseObject.h>

#include <String.h>


//Define o Host e Senha do firebase
#define FIREBASE_HOST"testefirebase-6a04d.firebaseio.com/"
#define FIREBASE_AUTH "UKMXPnz20iQlaedqkNk3wlN7RTQnar9cS2HIOHXy"

//Definindo variaveis dos pinos
int pinoLed = 5;

GPRS gprs;

void setup() {
   Serial.begin(9600);
  pinMode(pinoLed, OUTPUT);
  Serial.println("Conectando a rede!");

  //Inicia Comunicação com firebase
  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
  digitalWrite(pinoLed, 0);

}

void loop() {
   String ledStatus = Firebase.getString("led2");
  if(ledStatus == "ligado"){
    Serial.println(ledStatus);
    digitalWrite(pinoLed, 1);
  }
  else if(ledStatus =="desligado") {
    Serial.println(ledStatus);
    digitalWrite(pinoLed, 0);
  }

}

1 answer

-1

Is the library installed in the Arduin IDE or is it located within the project folder? Because apparently it is not using finding the Firebase. h inside the IDE’s library folder.

If you are using inside the project folder, try to put include like this #include "Firebaseuino. h". I don’t know if it’s true for the Arduin co-writer, but other C++ compilers include it with <library. h> indicates to search in the system/ide folder, while include it with quotes in the project folder or custom.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.