Compilation error- cannot convert 'const char [39]' to 'FirebaseConfig*' {aka 'firebase_cfg_t*'}

#include <FirebaseESP8266.h>
#include <ESP8266WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <Servo.h>


Servo servo;

#define FIREBASE_HOST "ali-feeder-default-rtdb.firebaseio.com"
#define FIREBASE_AUTH "MyFirebaseKey" 
#define WIFI_SSID "Ali-Feeder"
#define WIFI_PASSWORD "feedfish"

WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org",19800);


FirebaseData timer,feed;
String stimer;
String Str[]={"00:00","00:00","00:00"};
int i,feednow=0;
void setup() {
  Serial.begin(9600);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("Connecting to a");
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("connected: ");
  Serial.println(WiFi.localIP());

  timeClient.begin();
  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
  Firebase.reconnectWiFi(true);
  servo.attach(D3); // Pin attached to D3
}

void loop() {
  Firebase.getInt(feed,"feednow");
  feednow = feed.to<int>();
  Serial.println(feednow);
  if (feednow==1) // Direct Feeding
  {
      servo.writeMicroseconds(1000); // rotate clockwise
      delay(700); // allow to rotate for n micro seconds, you can change this to your need
      servo.writeMicroseconds(1500); // stop rotation
      feednow = 0;
      Firebase.setInt(feed, "/feednow",feednow);
      Serial.println("Fed");
  }
  else{ // Scheduling feed
    for(i=0;i<3;i++){
      String path = "timers/timer"+String(i);
      Firebase.getString(timer,path);
      stimer = timer.to<String>();
      Str[i]= stimer.substring(9,14);
    }
    timeClient.update();
    String currentTime = String(timeClient.getHours())+":"+String(timeClient.getMinutes());
    if (Str[0]==currentTime||Str[1]==currentTime||Str[2]==currentTime)
    {
      servo.writeMicroseconds(1000); // rotate clockwise
      delay(700); // allow to rotate for n micro seconds, you can change this to your need
      servo.writeMicroseconds(1500); // stop rotation
      Serial.println("Success");
      delay(60000);
    }
  }
  Str[0]="00:00";
  Str[1]="00:00";
  Str[2]="00:00";
}

help me fix this please am working on a school project

The similar question has been discussed in forum, try to use a search in upper right corner of the page.

By the way, did you read the message on the library Github page:

so does it mean that l have to use the new FirebaseClient library so that the error will be solved @b707

No.
On the contrary, if your code is written for an old library, it will probably not work with the new one and there will be even more errors.
I meant that if you are starting a new project - is it worth building it on an outdated library? Isn't it better to use a new one right away? - although this will most likely require rewriting the code

Compilation error- cannot convert 'const char [39]' to 'FirebaseConfig*' {aka 'firebase_cfg_t*'}

sorry to take you back, so does it mean if l uninstall the libraries l was using for firebase and install the old ones , the error above might be fixed?

It might helps, because your code is seems to require an old version of the library. But do you know, what the version you need?

Regarding to the error - see the thread below, the answer #3, your problem looks the same as in the link:

In order to fix the error you have to create a 'FirebaseConfig*' structure, but the library doesn't provide an examples of it... may be the examples were deleted since the library considered outdated.

In any case, I don’t think you should hope that you change something and the error will go away on its own. You need to understand the code and understand the library in order to fix the program.

is it okey if we have a private chat in any other platform ,wanna show you something sir

Sorry, I have nothing to add to what I have already written

okey thank you

The same thing happened to me and 2 days ago I'm going crazy... I solved it using the Firebace library
Rupakpoddar
although I had to make some changes to the code. I hope it helps you... excuse my writing, I'm from Argentina

please use firebase esp8266 client version 4.4 something it would work

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.