I am using the Arduino YUN to send data information to Firebase via wifi. I can retrieve information from my database (Using the httpclientConsole example in arduino) but I am having a hard time sending data to it. I tried running this code as well and replacing the proper URL: [Solved]Arduino yun mini + firebase, retrieve data from firebase - Arduino Yún - Arduino Forum
Here is the code that I got from the Firebase references that I'm trying to get to work:
#include <Process.h>
#include <Bridge.h>
#include <Console.h>
void setup()
{
Bridge.begin(); // Initialize the Bridge
Console.begin(); // initialize Console communication
while(!Console);
}
void loop()
{
// Simulate Get Sensor value
int sensor = random(10, 20);
Process p;
//I put the proper project name which is the name of my database
p.runShellCommand("curl -X POST -d '{"user_id" : "jack", "text" : "Ahoy!"}' 'https://[My project name].firebaseio.com/.json' ");
Console.println(sensor);
while(p.running());
delay(500);
}
This is where I got the code: Firebase Database REST API