and click the Save button.
This will store the session as shown in Figure 9. The
next time you open Pu TTY, you’ll have the option of
clicking on the mySession item and the ‘Load’ button to
have Pu TTY install your custom settings. Now, we are
ready to use Pu TTY to log a session from the Arduino.
Upload the Arduino Data to PuTTY
Click on the ‘Open’ window in Pu TTY. If you’ve
gotten the Arduino COM number and baud rate correct,
you’ll see output from the Arduino sin_array_test.ino
program as shown in Figure 10. You can see that the data
is now arranged in rows and columns — much like you’d
see in a spreadsheet. The data is saved to the
sine_data.csv file that we will open in a spreadsheet.
Open the Data in a Spreadsheet
As I stated earlier, I will use LibreOffice Calc (get it at
LibreOffice.org). Open Calc, and in the File menu select
Open, then browse to the sine_data.csv file. It will ask you
a question about format; just click yes and the data will
load as shown in Figure 11.
You’ll note that row 1 has some junk data that Pu TTY
put in as the first line to indicate when the data was
logged — just delete that entire row. Next, open the Insert
menu and click on the Chart item. The Chart wizard will
open and you can select the ‘Line’ chart type: ‘lines only.’
This will give you the chart shown in Figure 12.
Wow! Would you look at that! Was that easy or what?
We have suddenly become kings of data logging and
charting. Now, let’s use what we’ve learned to chart some
real data from the AHP fresh air controller.
Logging Data to an SD Card
SD cards can hold some serious data. And when I say
serious, I mean SERIOUS. Last month, we learned to
collect data using only the resources available on a raw
Arduino. We saw how to use some tricks to collect a
whopping 3,000 or so samples of data. We figured that
was enough to keep track of the fresh air controller for
about three days before needing to upload data to the PC.
If you use an SD card, you can collect gigabytes of
data. GIGABYTES — like as in billions and billions and
billions as Carl Sagan would say as he gazed his boggled
eyes at the stars. I ran a quick and probably inaccurate
comparison of using the raw Arduino versus a 2 GB SD
card and figure I could save fresh air controller data for
■ FIGURE 11: Sine wave data in LibreOffice Calc. ■ FIGURE 12: Sine waves in LibreOffice Calc chart.
December 2013 61
■ FIGURE 10: Pu TTY data log.