why is it working with library it should be working with <firebaseESP8266.h> because I am using module esp8266.
and when i use <firebaseESP8266.h> then it gives me this error:
"
In file included from C:\Users\HAMMAD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\SD\src/utility/Sd2Card.h:26:0,
from C:\Users\HAMMAD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\SD\src/utility/SdFat.h:29,
from C:\Users\HAMMAD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\SD\src/SD.h:20,
from C:\Users\HAMMAD\Documents\Arduino\libraries\Firebase_ESP8266_Client\src/FirebaseESP8266.h:69,
from C:\Users\HAMMAD\Documents\Arduino\sketch_jul18a\sketch_jul18a.ino:1:
C:\Users\HAMMAD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\SD\src/utility/Sd2PinMap.h:524:2: error: #error Architecture or board not supported.
#error Architecture or board not supported.
^
Multiple libraries were found for "SD.h"
Used: C:\Users\HAMMAD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\SD
Not used: C:\Program Files (x86)\Arduino\libraries\SD
exit status 1
Error compiling for board Generic ESP8266 Module."
#include <FirebaseArduino.h>
#include <ESP8266WiFi.h>
#include <ArduinoJson.h>
#define FIREBASE_HOST "variableresistor-54e97-default-rtdb.firebaseio.com"
#define FIREBASE_AUTH "xxx"
// Define your WiFi credentials
const char* WIFI_SSID = "NCRA";
const char* WIFI_PASSWORD = "xxxx";
int presistorValue=0;
// Define the pin for the variable resistor
//String mystring;
int RESISTOR_PIN = A0;
//int sdata=0;
void setup() {
// Initialize serial communication
Serial.begin(9600);
// Connect to Wi-Fi
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();
Serial.print("Connected to Wi-Fi, IP address: ");
Serial.println(WiFi.localIP());
// Set Firebase authentication details
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}
void loop() {
delay(500);
//Read the value from the variable resistor
presistorValue= analogRead(RESISTOR_PIN);
// Send the value to the Firebase Realtime Database
Firebase.setInt("resistorValue", 105);
// Print the value to the serial monitor
Serial.print("Resistor value: ");
Serial.println(presistorValue);
//sdata=analogRead(RESISTOR_PIN);
//mystring= String(sdata);
//Firebase.setString("Variable Resistor/Value",mystring);
// Delay for 1 second
delay(1000);
}