Arduino esp8266 wifi module compiling error

hello guys, how to fix this error?  thank you.



c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp: In member function 'virtual void FirebaseHttpClientEsp8266::begin(const string&)':
c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:47:50: error: no matching function for call to 'begin(const char*, const char [60])'
   47 |     http_.begin(url.c_str(), kFirebaseFingerprint);
      |                                                  ^
In file included from c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:9:
C:\Users\Septh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:166:10: note: candidate: 'bool HTTPClient::begin(String, uint16_t, String)' (near match)
  166 |     bool begin(String host, uint16_t port, String uri = "/")  __attribute__ ((error("obsolete API, use ::begin(WiFiClient, host, port, uri)")));
      |          ^~~~~
C:\Users\Septh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:166:10: note:   conversion of argument 2 would be ill-formed:
c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:47:30: error: invalid conversion from 'const char*' to 'uint16_t' {aka 'short unsigned int'} [-fpermissive]
   47 |     http_.begin(url.c_str(), kFirebaseFingerprint);
      |                              ^~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              const char*
In file included from c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:9:
C:\Users\Septh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:167:10: note: candidate: 'bool HTTPClient::begin(String, const uint8_t*)' (near match)
  167 |     bool begin(String url, const uint8_t httpsFingerprint[20])  __attribute__ ((error("obsolete API, use ::begin(WiFiClientSecure, ...)")));
      |          ^~~~~
C:\Users\Septh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:167:10: note:   conversion of argument 2 would be ill-formed:
c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:47:30: error: invalid conversion from 'const char*' to 'const uint8_t*' {aka 'const unsigned char*'} [-fpermissive]
   47 |     http_.begin(url.c_str(), kFirebaseFingerprint);
      |                              ^~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              const char*
c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp: In member function 'virtual void FirebaseHttpClientEsp8266::begin(const string&, const string&)':
c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:51:60: error: invalid conversion from 'const char*' to 'const uint8_t*' {aka 'const unsigned char*'} [-fpermissive]
   51 |     http_.begin(host.c_str(), kFirebasePort, path.c_str(), kFirebaseFingerprint);
      |                                                            ^~~~~~~~~~~~~~~~~~~~
      |                                                            |
      |                                                            const char*
In file included from c:\Users\Septh\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:9:
C:\Users\Septh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:168:70: note:   initializing argument 4 of 'bool HTTPClient::begin(String, uint16_t, String, const uint8_t*)'
  168 |     bool begin(String host, uint16_t port, String uri, const uint8_t httpsFingerprint[20])  __attribute__ ((error("obsolete API, use ::begin(WiFiClientSecure, ...)")));
      |                                                        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

Compilation error: exit status 1

upload the code (using code tags)?

what do you mean by using code tags??  thank you for the response.  

this the code I use.

#include <ESP8266WiFi.h>

#include <FirebaseArduino.h>

// Set these to run example.

#define FIREBASE_HOST "sernsor-readings-default-rtdb.firebaseio.com"

#define FIREBASE_AUTH "YKTFxNhhZybXeWRR3kv7CDuqcwBJSqvcS9GNBodv"

#define WIFI_SSID "asdasdasd"

#define WIFI_PASSWORD "01001010"

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);

}

int n = 0;

void loop() {

  // set value

  Firebase.setFloat("number", 42.0);

  // handle error

  if (Firebase.failed()) {

      Serial.print("setting /number failed:");

      Serial.println(Firebase.error());  

      return;

  }

  delay(1000);

  

  // update value

  Firebase.setFloat("number", 43.0);

  // handle error

  if (Firebase.failed()) {

      Serial.print("setting /number failed:");

      Serial.println(Firebase.error());  

      return;

  }

  delay(1000);

  // get value 

  Serial.print("number: ");

  Serial.println(Firebase.getFloat("number"));

  delay(1000);

  // remove value

  Firebase.remove("number");

  delay(1000);

  // set string value

  Firebase.setString("message", "hello world");

  // handle error

  if (Firebase.failed()) {

      Serial.print("setting /message failed:");

      Serial.println(Firebase.error());  

      return;

  }

  delay(1000);

  

  // set bool value

  Firebase.setBool("truth", false);

  // handle error

  if (Firebase.failed()) {

      Serial.print("setting /truth failed:");

      Serial.println(Firebase.error());  

      return;

  }

  delay(1000);

  // append a new value to /logs

  String name = Firebase.pushInt("logs", n++);

  // handle error

  if (Firebase.failed()) {

      Serial.print("pushing /logs failed:");

      Serial.println(Firebase.error());  

      return;

  }

  Serial.print("pushed: /logs/");

  Serial.println(name);

  delay(1000);

}

Click the </> symbol and put your code (and error message) in between the ''' s
Please edit your posts

code tags

#include <ESP8266WiFi.h>

#include <FirebaseArduino.h>

// Set these to run example.

#define FIREBASE_HOST "sernsor-readings-default-rtdb.firebaseio.com"

#define FIREBASE_AUTH "YKTFxNhhZybXeWRR3kv7CDuqcwBJSqvcS9GNBodv"

#define WIFI_SSID "asdasdasd"

#define WIFI_PASSWORD "01001010"

void setup() {

Serial.begin(9600);

// connect to wifi.

WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

Serial.print("connecting");

while (WiFi.status() != WL_CONNECTED) {

Serial.print(".");

much easier to read.

edited the post . thank you.

I just want to connect the arduino and esp-01 to firebase and I encounterd the compiling error

Ok, well it might not be such a good idea to leave your firebase credentials here for public viewing.
What you are running is the FirebaseDemo_ESP8266.ino example isn't it ?
The library doesn't seem to be maintained which could indicate a source for your problem. The core you are using is quite fresh. I will see if i can compile it with an older core.

no problem with the credensitials sir, its just a sample also. Yes , I used the FirebaseDemo_ESP8266. thank you , I'm really struggling to look for a solution to this.

Hi,
I compiled your code here on my PC and there was no error.
The lib : FirebaseArduino.h I downloaded from :

My IDE version is: 1.8.9,

I also compiled the code on 1.8.9 IDE version. I still have the same errors.

I compiled the code on my PC IDE 1.8.13 and got errors

In file included from C:\Users\bb\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:30,
                 from C:\Users\bb\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22,
                 from C:\Users\bb\Documents\Arduino\sketch_may20a\sketch_may20a.ino:3:
C:\Users\bb\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see https://arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6
  109 |     std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                             
In file included from C:\Users\bb\Documents\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22,
                 from C:\Users\bb\Documents\Arduino\sketch_may20a\sketch_may20a.ino:3:
C:\Users\bb\Documents\Arduino\libraries\firebase-arduino-master\src/Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see https://arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6
   86 |   std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                               

I have ArduinoJson 6 so the code needs updating

I installed Arduinojson 5 and then got the sames errors as reported in post #1

thank you for trying. I'm still having the same errors.

could be wrong

thats really the url, I had a typo on naming it. so I just leave it as it is if that's what you meant. thank you for the response.