▷ Practice 24: Firebase

 ⭐⭐⭐⭐⭐ Practice 24: Firebase

General objective:

  • Sense data and upload it to Firebase Realtime Database.

Materials:

  • Firebase
  • TSC-Lab


Introduction:

Firebase is a platform for the development of web and mobile applications, launched in 2011 and acquired by Google in 2014. It is a cloud-based platform, integrated with Google Cloud Platform, which utilizes a set of tools for the creation and synchronization of projects aimed at delivering high-quality applications. This enables the growth of the user base and also facilitates greater monetization.

In this current project, the aim is to utilize the Realtime Database, a cloud-hosted NoSQL database that allows you to store and synchronize data among your users in real-time. To achieve this, temperature data will be sensed and uploaded along with the PWM (pulse-width modulation) of the heater. These data points will be sorted by date and time.

Steps:

Note: You must be logged in to your Google account. It is assumed that you have installed the libraries from previous practices, and additionally, you need to install the Firebase Arduino Client for ESP8266 and ESP32 library, version 2.3.7 (this version is recommended to avoid potential issues).


The steps to carry out this practical are the following:
  1. Go to Firebase (google.com) and at the top right select Go to console.

  2. If this is the first time you are using Firebase, a screen like the following will appear, and you must select "Create a project." 

  3. Give the project a name, accept the conditions, confirm the use of Firebase and click "Continue".

  4. Enable Google Analytics and click "Continue".

  5. Configure Google Analytics, select Ecuador as the location, accept the conditions and click "Create project".

  6. The project will be created and a screen like the one shown below will appear and click "Continue".

  7. On the left side of the screen, click on Compilation, several options will be displayed and click on "Realtime Database". 

  8. Click on "Create a database".

  9. Choose United States as location and click "Next".

  10. For this occasion select "Start in test mode" and click "Enable".

  11. Create an authentication method.

  12. Click "start".

  13. Select "Anonymous".

  14. Habilitar el switch y guardar.

  15. Copy the following code to the Arduino IDE, but do not upload it to TSC-Lab yet.  
    
  1. Copy the URL of the project and paste it on line 20 of the code (FIREBASE_HOST variable) previously copied.

  2. On the left side of the screen, click here:

  3. Click on "Project Settings".

  4. Copy the WEB API key and paste it into the API_KEY variable.

  5. Change the WiFi credentials and upload the code to the TSC-Lab.
  6. Once the code is uploaded, in the Realtime Database section you can view the data upload.

                  

Comentarios

Popular Posts

▷ Especificaciones del módulo ESP32

▷ #ESP32 - REAL-TIME CLOCK #RTC INTERNO

▷ #ESP32 - SINCRONIZAR RTC INTERNO CON SERVIDOR NTP

▷ #ESP32 - Display OLED 128x64

▷ #ESP32 - Over-The-Air programming #OTA

▷ #ESP32 - #MQTT (Introducción)

▷ PROTEUS PCB DESIGN

▷ DISEÑO DE SISTEMAS DIGITALES, PROYECTOS PROPUESTOS (2019 2do Término)

▷ SISTEMAS EMBEBIDOS, PROYECTOS PROPUESTOS (2021 PAO1)

▷ #ESP32 - INSTALAR LIBRERIAS DESDE GESTOR LIBRERIAS ARDUINO