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.

Problem:

  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:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

Serial.println(“Started”);

// set the data rate for the SoftwareSerial port
esp8266.begin(115200);
esp8266.write(“AT\r\n”);
}

void loop() {
if (esp8266.available()) {
Serial.write(esp8266.read());
}
if (Serial.available()) {
esp8266.write(Serial.read());
}
}

did you solve it?
we got the same problem