Introduction: Home Weather Station With Your Own Android App

In this work I show how to send Sensor Data to Android using Google Firebase & ESP8266 NRF24L01 Wifi Gateway with Arduino NRF24L01 Node

Step 1: Bill of Materials

  • Arduino UNO (Arduino UNO R3 Development Board) - (1)
  • NodeMCU (ESP8266-12E Board) - (1)
  • NRF24L0 (12.4 Ghz Transceiver Module) - (2)
  • DHT11 Sensor (DHT11 Humidity Temperature Sensor) - (1)
  • Connecting WiresJumper Wires

Step 2: Connections of Transmitter

The first circuit diagram is a Transmitter End Section. Assemble the Circuit as shown in the figure. It consists Arduino Uno, NRF24L01 & DHT11 Humidity & Temperature Sensor.

Step 3: Connection of Receiver

The second circuit diagram is a Receiver End Section. Assemble the Circuit as shown in the figure. It consists NodeMCU ESP8266-12E WiFi Module and NRF24L01

Step 4: Transmitter Code

Download these libraries:

  1. Radiohead NRF24L01 Library:
  2. iDHT11 Library:

Then use this code

Step 5: Receiver Code

FirebaseArduino is a library to simplify connecting to the Firebase database from Arduino clients. It is a full abstraction of Firebase’s REST API exposed through C++ calls in a wiring friendly way. All JSON parsing is handled by the library and you may deal in pure C/Arduino types.

The library cannot work standalone. So you need to add the ArduinoJSON library as well.

1. So first go to the library manager and search for “JSON” & install the library.

The latest JSON library might not work with the code. So you may need to downgrade the library to version v5.13.5

2. Then you need to install Google Firebase library as well. So, download the library from below link and add it to Library folder after extraction

3. Before uploading the code, make sure to do the changes to FIREBASE_HOST (it ends on You can get this parameter from Google Firebase Console. Also change the WIFI_SSID & WIFI_PASSWORD from the given code and replace it with your wifi SSID & Password.

Check the complete code here

Step 6: Google Firebase

Google Firebase is a Google-backed application development software used for creating, managing,and modifying data generated from any android/IOS application, web services, IoT sensors & Hardware. To learn more about the Google Firebase Console, you can read the official from Google Firebase

Step 7: Android Studio

1. You need to use AndroidStudio and Create a project. Main Activity Class should contain folowing code (MainActivity).

2. In the build.gradle(Project: nameofyourproject) add in dependencies:

classpath ''

3. In the build.gradle(Module: app) add in dependencies:

compile ''

and at the end

apply plugin: ''

After all changes in gradle files you should click on (Sync now) from above

4. Main Activity xml file should contain code (activity_main)

For all additional information watch video tutorial

Step 8: How It Works (on Russian)

Arduino Contest 2020

Participated in the
Arduino Contest 2020