Arduino Uno connect to Firebase via ESP8266-01 (as a gateway)

Project Description:
My project is using Arduino Uno as main controller. Sensor and actuator connect to Arduino Uno. Then Uno connect to Firebase via ESP8266-01 which act as a gateway just to send data and recieve data.

What i did:
i have proven that UNO can talk to ESP8266-01 through software serial by uploading code to UNO. The code as shown below.


  1. How to connect UNO to firebase via esp8266?
  2. Do we need to flash code to ESP8266 so that UNO can talk to firebase? If yes then how?
  3. What is the library i need to use?
  4. I tried #include <FirebaseArduino.h> but have met some problem. The library not for UNO?

*Normally, i found that people straight connect ESP8266 to Firebase, hence they need to flash code using FTDI without UNO. It is hard to find that people use UNO as main controller and transmit data through ESP8266-01. Is this concept not appropriate or have better advantage using other concept? Any other better concept for that purpose?

Your kind assistance will be greatly appreciated.Thankss! :slight_smile:

Below is the code that communicate between UNO and ESP8266-01

#include <SoftwareSerial.h>

SoftwareSerial esp8266(2, 3);

void setup() {
// Open serial communications and wait for port to open:
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only


// set the data rate for the SoftwareSerial port

void loop() {
if (esp8266.available()) {
if (Serial.available()) {

did you solve it?
we got the same problem