Skip to content

Seamlessly integrate ESP8266 devices with Firebase Realtime Database using this lightweight and efficient library

License

Notifications You must be signed in to change notification settings

atiquz/FirebaseESP8266

Repository files navigation

FirebaseESP8266 Library

The FirebaseESP8266 library is a versatile and lightweight Arduino library designed to facilitate seamless integration of ESP8266-based devices with Google Firebase Realtime Database. This library allows users to effortlessly send and receive data between their ESP8266 devices and the Firebase Realtime Database, enabling dynamic and real-time communication.

Getting Started

  1. Installation: To use the FirebaseESP8266 library, include it in your Arduino IDE and import it into your sketch. Ensure that you have the required dependencies, such as FirebaseESP8266 and ESP8266WiFi.

    #include <FirebaseESP8266.h>
    #include <ESP8266WiFi.h>
  2. Initialization: Create an instance of the FirebaseESP8266 class, specifying your Firebase Realtime Database URL during initialization.

    FirebaseESP8266 firebase("PASTE_FIREBASE_REFERENCE_URL");
  3. Connection: Connect your ESP8266 device to a WiFi network using your SSID and password.

    WiFi.begin("SSID", "PASSWORD");
  4. Data Interaction: Use the library's methods to send and receive data to and from the Firebase Realtime Database.

    firebase.setString("Fruits/Product", "Apple");
    firebase.getInt("Fruits/Code");
  5. JSON Support: The library supports both JSON and non-JSON modes for data interaction. Toggle JSON mode as needed.

    firebase.json(true); // Enable JSON mode
  6. Push Operations: Utilize push methods for appending data to arrays in Firebase.

    firebase.pushString("Updates", "Apple");
  7. Data Retrieval: Retrieve data from Firebase using appropriate data types.

    String data1 = firebase.getString("Fruits/Product");
  8. Delete Data: Delete data at a specified path in the Firebase Realtime Database.

    firebase.deleteData("Fruits");

Example Usage

See the provided example sketch (FirebaseESP8266Demo.ino) for a comprehensive demonstration of the library's features.

Contributions and Issues

Feel free to contribute to the development of this library by submitting pull requests. If you encounter any issues or have suggestions, please open an issue on the GitHub repository.

License

This library is open-source and distributed under the MIT License.

Happy coding with FirebaseESP8266!

About

Seamlessly integrate ESP8266 devices with Firebase Realtime Database using this lightweight and efficient library

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages