Data logging with Arduino

Super sweet sensor sexiness over the serial stream.

Tom Igoe’s blog code, circuits, and construction has posted a tutorial on how to log data from your Arduino and put it into your platform or format of choice. As Tom explains, there’s a few common pathways once you’ve read a sensor or accepted some other form of input:

  • Serial transmission to a personal computer, and serial capture to a file.
  • Saving data to an SD card mounted on the Arduino.
  • HTTP upload to via an Ethernet shield or Ethernet Arduino.

The last option is what we find most interesting. Pachube is a service designed to facilitate the “Internet of Things”, and allows you to upload data to their site from any source. Once there, it can be graphed, plotted, and manipulated using the Pachube API. Sources can be slotted into web applications or simply used to provide a monitoring service or publicly available data dashboard.

Pachube is deserving of its own post on EngBlaze at some point, but for now, it’s great to see a tutorial on how to leverage its power using Arduino. Together, the two are a formidable combination: low-cost hardware plus the best the cloud has to offer. The potential for creating real applications is limitless.

We see a lot of “ROFL MY TOILET IS TWEETING” projects around these parts. While nobody loves a good toilet tweet more than we do, we also believe that Arduino can be a professional prototyping platform and more than just a hobbyist kit. Data collection is a powerful tool in the inventor’s arsenal, and with a method to access said data from anywhere, developers can take things to the next level. If you’ve always wanted to use your Arduino as a set of remote eyes and ears, check out the tutorial and dive in.

Source: code, circuits, and construction

3 thoughts on “Data logging with Arduino

  1. Hello,

    Thanks for this very usefull explanation. I tried it with my brand new Arduino Uno and it worked perfectly well.

    However, I have one question: Is there a way to collect decimals digits in the temperatures (like 22.6 °C for instance) assuming the accurracy of the device allows it.

    Thanks again

    Kind regards


    • Hi Olivier, in the microcontroller world, numbers with decimals are referred to as “floating-point” numbers. The Arduino is capable of handling floating-point with the float datatype: . However, using floating-point numbers (or “floats”) takes more memory, and sacrifices some precision due to the way the processor must store them.

      In many cases, you are better off storing and manipulating your temp data as an integer or long integer, and converting it to floating-point notation only when you wish to display it. This depends on your application, but in general, the rule of thumb is to avoid floating-point math unless you absolutely need it.

Leave a Reply

Your email address will not be published. Required fields are marked *