FirebaseArduino vs Firebaseesp8266

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

Your topic has been moved to a more suitable location on the forum. You should not post in "Uncategorized". See Uncategorized - Arduino Forum.

1 Like

Regarding your deleted question. Often a topic fits in multiple categories and in general it does not matter too much.

The most suitable ones would in my opinion have been one of the following (in random order)

  1. Microcontrollers
  2. Project Guidance
  3. Programming Questions

I chose the latter as you posted a code that, based on the error message, did not compile.

1 Like

The error message is clear. The board or controller is not supported by one library. It looks like an sd library needs to be changed.

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