Hi, Need help.
When I uploaded the code and compiled it successfully. The sensor data are not updated to the firebase. I can see all JSON data in the serial monitor. The updates from “digital, message, and pvm are updated n the serial monitor. I’m using DHT11 and made the necessary changes in the code for that particular sensor. Please help. Thanks
DHT 11 code
#include <Arduino.h>
#include <WiFi.h>
#include <Firebase_ESP_Client.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <DHT.h> // Add DHT library
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// DHT11 sensor
#define DHTPIN 4 // Define the pin where the DHT sensor is connected
#define DHTTYPE DHT11 // Define the DHT sensor type
DHT dht(DHTPIN, DHTTYPE);
float temperature;
float humidity;
void setup(){
Serial.begin(115200);
// Init DHT sensor, OLED, and WiFi
initOLED();
initWiFi();
// Initialize DHT sensor
dht.begin();
void loop(){
// Get latest sensor readings from DHT sensor
temperature = dht.readTemperature();
humidity = dht.readHumidity();
Serial Monitor
0, Type: object, Name: digital, Value: {"2":0,"12":20}
1, Type: object, Name: 2, Value: 0
2, Type: object, Name: 12, Value: 20
3, Type: object, Name: message, Value: "its working"
4, Type: object, Name: pwm, Value: {"13":0,"14":0}
5, Type: object, Name: 13, Value: 0
6, Type: object, Name: 14, Value: 0
Received stream payload size: 112 (Max. 112)
FAILED
REASON: Invalid data; couldn't parse JSON object, array, or value.