Log and Graph the Data

Data Logging

When you're ready to log the data, here are the steps (as shown in the video above):

  • While the Feather is unpowered, insert the SD card into the Adalogger card slot
  • Power on the Feather using USB or battery power
  • Place your finger in the pulse oximeter reader and power it on
  • Wear the pulse oximeter for as long as you'd like to log the data
  • Remove the pulse oximeter from your finger and allow it to power down
  • Power down the Feather
  • Remove the SD card

The data will have been written to the SD card in a file called log.txt. Let's look at how to graph that data.

Graphing the Data

Using an SD card reader, and SD card adapter if necessary, plug your SD card into your computer. You'll have a file called log.txt appear on it. Copy that file to your computer.

The log file contents will look something like this:

Tuesday 21/4/2020 18:15:34, 99, 74, 46.00
Tuesday 21/4/2020 18:15:36, 99, 75, 67.00
Tuesday 21/4/2020 18:15:38, 99, 75, 26.00
Tuesday 21/4/2020 18:15:40, 99, 75, 91.00
Tuesday 21/4/2020 18:15:43, 99, 75, 91.00
Tuesday 21/4/2020 18:15:45, 97, 76, 71.00
Tuesday 21/4/2020 18:15:47, 97, 76, 16.00

This has the day/date/time stamp followed by the SpO2%, pulse, and pleth, all separated by commas.

Note that some spreadsheet programs require you to change the extension to ".csv". Otherwise they don't know what to look for and may import incorrectly.

Next, open the file into a spreadsheet program of your choice. We've used Google Sheets. Open a new spreadsheet.

Click File and choose Import.

At the top of the Import file window, click Upload. Then click "Select a file from your computer" and choose your log.txt file.

No changes are needed in the Import File dialog box - the defaults work for our project.

Click Import data.

Now we have our data! It's almost ready to graph.

You can see here that the automatic delimiter detection worked well -- it placed the time-date stamp in one column and each piece of data in its own column, all based on the commas found in the original log.txt file.

You can now select the data you want to graph and click Insert > Chart in the menus.

You can adjust the chart drawing style, labels, colors, and more to your satisfaction.

Here's an intro guide on using charts in Sheets.

There's also some great info in this guide to tuning your data logging graphs.

While your data should ideally be pretty consistent, you can try running around and doing jumping jacks to get some bigger changes in the data you log, just be safe!

This guide was first published on Apr 28, 2020. It was last updated on Apr 28, 2020.
This page (Log and Graph the Data) was last updated on Jun 29, 2020.