Pushing Data to Data.SparkFun.com

Contributors: Jimb0
Favorited Favorite 2


SparkFun’s Data.SparkFun.com service allows you to easily push your data to the “cloud.” Whether you’re posting weather readings, office environment conditions, or anything else, it can come in handy to have a central, online location to store those sensor readings. By sending a simple HTTP request to the Data.SparkFun.com server, your project data is stored and displayed in a simple database where it can be retrieved or reviewed at your leisure.

SCreenshot of the stream

Any electronics project that can be Internet-connected should be able to post data to the SparkFun data service. Luckily, these days – with Internet-of-Things applications taking off – there is no shortage of hardware gateways to the web. Basic Arduino’s can rely on shields for WiFi or Ethernet access, while many advanced development platforms already have WiFi or Ethernet built-in.

alt text

An assortment of shields and development boards that can be used as your hardware’s Internet gateway for Data.SparkFun.com.

This tutorial is a grab bag of example sketches and scripts that show how you can publish anything to our data service using most of today’s popular hardware platforms. Each example has a section dedicated to the example hookup, code and setup:

  • Arduino & Ethernet Shield – The Ethernet Shield has been one of the Arduino’s longest lasting Network portals around. If you don’t mind a few wires hanging out of your project, this shield is one of the most reliable options around. This example also works with the PoEthernet Shield, or really any shield that uses the Ethernet library.
  • Arduino & CC3000 Shield – The CC3000 WiFi Shield is one of our newest offerings to the WiFi Shield market. Because it’s relatively low-cost and reliable, it’s a great choice if you’re short on RJ-45 ports or Cat5 cable.
  • Arduino & WiFly Shield – The WiFly Shield is another long-surviving shield that makes connecting your ‘duino to WiFi easy. Not as cheap as the CC3000, but a good option if you’ve already got a Shield lying around.
  • Arduino Yun – Internet-of-things applications like this are what the Arduino Yun was made for. With built in Ethernet, WiFi, and even Linux, not much stands in the way of your data on its way to the web.
  • Raspberry Pi (using Python) – With a full Linux kernel at its fingertips, the Raspberry Pi should have no problems posting an HTTP request. In this example we’ll use Python, which allows us to toggle I/O at the same time.
  • Electric Imp – A prerequisite to using the Electric Imp is that it must be Internet-connected to download code. With its ability to work with web “agents”, the it’s easy to get the imp posting HTTP requests.

Each section of the tutorial will demonstrate an example sketch for a particular piece, or combination of hardware. But before clicking over to the platform you plan on using, check out the What is Phant? first. That’s where we’ll demonstrate how to create a data stream and how to use it.