Hello, I need some help with this project that I'm working on.
I've been connecting my arduino to firebase through nodemcu and I created an object in the database that gets updated.
That's how my database looks like this. 1 object arduino-a0097-default-rtdb with 3 fields.
I created the JsonObj like this
StaticJsonBuffer<1000> jsonBuffer;
JsonObject& data = jsonBuffer.createObject();
data["seconds"] = seconds;
data["centi"] = centisecond;
data["fails"] = count;
and received the object in nodemcu like this
StaticJsonBuffer<1000> jsonBuffer;
JsonObject& data = jsonBuffer.parseObject(nodemcu);
int seconds = data["seconds"];
int centisecond = data["centi"];
int fails = data["fails"];
Firebase.setFloat("Seconds", seconds);
Firebase.setFloat("Centiseconds", centisecond);
Firebase.setFloat("Fails", fails);
But now I need that every time I update the data to create a new object in the database. To have multiple objects arduino-a0097-default-rtdb with those 3 fields. Like multiple objects with different ids.
How can I do that?
PS: I tried to create a new JsonObject& data2 but it doesn't work.
Thank you so much!