I’m working in a project in which I want to send data from a sensor to a Google Spreadsheet. I am using an Arduino Yún. As advised in different internet articles, I decided to send sensor data through a Google Form via the curl command and the
runShellCommand function. It turns out that the code works fine if the Arduino Yún is connected to my computer. When I unplug the Arduino and connect it to an external battery/outlet the sketch does not work. I am kind of interested in figuring out what is going on with the code (yes, I just started with Arduino…).
I paste the code below… in the variable
value is where the sensor data goes:
Thanks a lot guys!
Bridge.begin(); // Initialize the Bridge
Serial.begin(9600); // Initialize the Serial
// Wait until a Serial Monitor is connected.
int value = 0;
p.runShellCommand(“curl “Arduino Trial” + String(value) + “&pageHistory=0” -k”);
int result = p.parseInt(); /* look for an integer /
Serial.print(“Result:”); / Some serial debugging */
delay(20000); // Wait one second before get another temperature reading