Mistake

Slowly noticed how I started missing sadness like a loyal friend that comforts or a shade I would pull when the light is too much It’s a comfortable feeling I would always reach out to I missed it…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Serverless IoTs with Firebase Realtime Database and ESP32

Part2 — ESP32 Setup

From Part1 of Serverless IoTs with Firebase RTDB, we setup the Firebase RTDB already with project name “ESP32 Firebase Project” and project ID “esp32-firebase-project”.

This part of story we will wiring the circuits, install Firebase Arduino Library for ESP32 in Arduino IDE, connect ESP32 to Firebase RTDB and test for store and read data from database.

All ESP32 boards are supported by the Firebase RTDB library we used.

Here is the circuit for 2 nodes (ESP32 module).

Each node consists of one push button and LED and two resistors (200 and 4.7 k ohms).

We will turn the LED1 (GPIO19) on Node 1 (U1), ON and OFF by push the button S2 (GPIO18) on Node2 (U2) and also LED2 (GPIO19) on Node 2 (U2) will be controlled by push button S1 (GPIO18) on Node1 (U1).

If you never installed ESP32 Arduino Core SDK for Arduino IDE or don’t know about this, please check this demo.

For Arduino IDE and Platformio, this library is available from Library Manager.

This story we will show you how to program in Arduino IDE.

From Arduino IDE, open Library Manager Window by go to menu Sketch > Include Library > Manage Libraries…

Search “firebase” in Library Manager, select Firebase ESP32 Client by Mobizt, choose the latest version, 3.1.2 in this example and click Install button and close this window.

Arduino Sketch for Node2 (U2)

When you turn on/off button or switch 1 on Node 1, the LED2 on Node 2 will be ON/OFF and on other hand, when you turn on/off button or switch 2 on Node1, the LED1 on Node1 will be ON/OFF.

Here is the data in your Firebase RTDB looks like.

Add a comment

Related posts:

Travel Loyalty Programs 2.0

It is a fact that there has been little innovation in the world of travel loyalty programs in the past. But it is also a fact that customers’ expectations have dramatically evolved and changed…