Hardware Reference
In-Depth Information
We also start a date process, to automatically send the measurements date to Google Docs:
time = millis();
if ( ! date.running()) {
date.begin( "date" );
date.addParameter( "+%D-%T" );
date.run();
}
In the loop() function, the most important line is:
runAppendRow(humidity, lightLevel, pressure, temperature, altitude);
This function calls the function to automatically send the data to the Google Docs spread-
sheet. I won't get into the details of this function, but of course you will find all the code
in the GitHub repository of this project. The loop() of the Arduino sketch is repeated
every 10 minutes with a delay() function, as these variables are usually changing slowly
over time.
Note that all the code is available inside the GitHub repository of the topic:
https://github.com/openhomeautomation/iot-book
Finally, you are ready to test the project. Make sure you modified the files with your own
data, upload the code to the Arduino Yun board. After that, open the Google Docs spread-
sheet in your browser again, and wait a moment. After a while, the first measurement
should appear inside the spreadsheet:
Search WWH ::




Custom Search