Archive for December, 2010

Save sensor data to Google Spreadsheets by Codebox

Saturday, December 25th, 2010

I found this is really a good way to gather data, since Google Spreadsheets is free and can be accessed from any places in the world as long as connected to the internet. Plus, you can share it with selected persons you want. It’s quite useful for scientific researchers to share and analyze their findings. Check this out (completed with the codes):

The “Hello Arduino” section in Chapter 11 of Getting Started with Processing shows how to read data into Processing from Arduino. In a nutshell, the Arduino code (example 11-6 in the book) reads data from a light sensor and writes it out to the serial port. The section then goes on to describe a number of increasingly sophisticated sketches that retrieve and visualize the sensor data using Processing’s Serial library.

This Codebox shows you how to save this sensor data to a Google Spreadsheet. The cool thing is that you can then use any of the goodies that Google provides (charts, gadgets, maps, etc) directly with your data. While the light sensor is pretty basic, you can use this basic setup to record data from more sophisticated sensors, such as a Parallax GPS receiver module into Google Spreadsheets, and then create a map of where you’ve been that you could post as a gadget.

The sketch relies on the Google API Client Library for Java, which is a set of code libraries for interacting with various Google’s services (not just Spreadsheets). In researching this article, I found Processing guru Jer Thorpe‘s article Open Science, H1N1, Processing, and the Google Spreadsheet API a great inspiration. While it’s based on an older version of the API (version 1.0, while the APIs are now up to version 3.0), it’s a great introduction to interacting with Google.

Courtesy Make