Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Recap:
Over the past several months we have been learning to use the Arduino Handheld
Prototyper (AHP), a device that lets us design our prototypes on a breadboard with the
But what if we want to log a lot of data? We really have two choices; first we can keep
the data logger tethered to a PC and use the serial port to upload the data as it comes in.
This is great for applications where you dont mind having a PC handy, but what about
the Handheld part of the Arduino Handheld Prototyper? How can we collect lots of
data and have the AHP embedded far away from a PC? One good solution is to use an SD
card since you can store a bagillion samples and then you can take the SD card out of the
AHP and plug it into the SD card slot of a PC to read the data. Or you can leave it in the
AHP and upload the data to the PC via the serial port. Either way, once the data is on the
PC then we can put it in a spreadsheet and generate a chart like the one shown in Figure
2. Lets look first at how to upload the sensor data directly to the PC via the serial port,
then well look at using the SD card moving it between the AHP and PC.
I recommend that you either reread the last several articles in this series or if you dont
have it in the magazine hardcopy you can find them on the www.smileymicros.com
Articles and Downloads section. Youll want the hardware to go along with all this
discussion, so you can get the Arduino Protoshield Kit, the I2C Mini Terminal Kit, or
them both in the Arduino Handheld Prototyper Kit from Nuts&Volts magazine and their
web store.
This will send the csv data out the serial port where it an be collected into a .csv file on
the PC. Now that we can generate some fake data, lets see how to upload it to a PC and
then use it to draw a chart.
Figure 15: shows the information with the correct chipSelect set for a 2GB card:
In LibreOffice Calc I set the Chart to only show the data, not the datetime since I already
know that the data is taken at five-second intervals. The datetime data is in unixtime
which as weve seen is the number of seconds since Jan 1, 1970 and we can take that data
and display it anyway we want, but it isnt relevant at the moment so I left it out. Use the
LibreOffice Calc File menu to browse to the datalog.csv file and open it and display the
data as you were shown earlier with the sine data as shown in Figure 18.
Now what?
This is the last of the six part series on the Arduino Handheld Prototyper. In these six
articles weve learned a lot about using the Arduino Proto Shield and the I2C Mini
Terminal combined into the Arduino Handheld Prototyper. Now you can create your own
Arduino designs that can be used remotely talk to a user using a small LCD and 5-button
navigation system. You can keep track of the dates and times and you can store a small
amount of data on the Arduino or a large amount of data on an SD card. You can get the
Arduino Handheld Prototyper or its subcomponents, the Arduino Proto Shield, the I2C
Mini Terminal and the Base Kit all from the Nuts&Volts magazine or its web store and
you can find these six articles under the articles and downloads button of the Smiley
Micros web site.