Official ThingSpeak Library for Arduino and Particle

We are thrilled to announce the official ThingSpeak Communication Library for Arduino and Particle devices. This library enables an Arduino or other compatible hardware to write or read data to or from ThingSpeak, an open data platform for the Internet of Things with built-in MATLAB analytics and visualization apps.

Arduino IDE Installation

In the Arduino IDE, choose Sketch/Include Library/Manage Libraries. Click the ThingSpeak Library from the list, and click the Install button.

Particle / Spark IDE Installation

In the Particle/ Spark Web IDE, click the libraries tab, find ThingSpeak, and choose “Include in App”.

Compatible Hardware

  • Arduino or compatible using an Ethernet or Wi-Fi shield (we have tested with Uno and Mega)
  • Arduino Yun running OpenWRT-Yun Release 1.5.3 (November 13th, 2014) or later.
  • Particle Core or Photon (Formally Spark)

ThingSpeak Examples

The library includes several examples to help you get started.

  • CheerLights: Reads the latest CheerLights color on ThingSpeak, and sets an RGB LED.
  • ReadLastTemperature: Reads the latest temperature from the public MathWorks weather station in Natick, MA on ThingSpeak.
  • ReadPrivateChannel: Reads the latest voltage value from a private channel on ThingSpeak.
  • ReadWeatherStation: Reads the latest weather data from the public MathWorks weather station in Natick, MA on ThingSpeak.
  • WriteMultipleVoltages: Reads analog voltages from pins 0-7 and writes them to the 8 fields of a channel on ThingSpeak.
  • WriteVoltage: Reads an analog voltage from pin 0, converts to a voltage, and writes it to a channel on ThingSpeak.

Complete source code and examples for the ThingSpeak Library are available on GitHub.

Collecting Dust Levels with ThingSpeak and ESP8266 Wi-Fi

Using the ESP8266 Wi-Fi module, [shadowandy] built a dust sensor to measure dust levels in his house. The project incorporates the Shinyei PPD42NS dust sensor to do the measurements and posts the data to his ThingSpeak channel from data collection and reaction to dust levels.

Dust Sensor sending data to ThingSpeak

The sensor records the PM10 and PM2.5 dust levels to get an accurate indication of the dust in the air. This project is a great example of how a little sensor could turn into something important for protecting machine shops, construction sites, and garages.

[via shadowandy / GitHub]

Send Windows Server Data to ThingSpeak using PowerShell

Do you maintain Windows Servers? If so, you might want to track server resources. ThingSpeak accepts data from anything and fits perfectly for server monitoring, visualization, and analysis. [NotHans] released a PowerShell Script to report Windows Server disk free space to ThingSpeak. Once in ThingSpeak, use a ThingSpeak to visualize server resources and send alerts to low disk space with ThingSpeak React. Use this PowerShell Script as a starter script to send data to ThingSpeak from Windows-based systems. Check out the open source script on GitHub.

[via GitHub]

[Official Tutorial] Monitoring Linux Server Statistics

ThingSpeak can be used to easily monitor CPU usage %, memory usage %, and disk usage % on any Linux machine connected to the internet.

First, create a new Channel, and fill out the field names as follows: Field 1 = “CPU Usage (%)”, Field2 = “Memory Usage (%)”, Field 3 = “Disk Usage (%)”.

ThingSpeak Channel Settings

Next, add the open-source server statistics script to your server, which can be found at:

Inside the script there’s an API Key variable, which should be replaced with your specific Channel’s API Key (leave the single quotes, and only replace the X’s): api_key='XXXXXXXXXXXXXXXX'

For the script to work properly, install the “bc” package via: sudo apt-get install bc

Then make the script executable: chmod +x

Finally, edit your crontab file: crontab -e

Make the script execute every minute by adding this line to your crontab (make sure you use the proper path to the script): * * * * * /path/to/

The script will then automatically POST server stats to the Channel specified by the API Key every minute.

You can see some of the ThingSpeak server statistics here:


[Official Tutorial] Connecting Electric Imp to ThingSpeak IoT Data Services

Build Open Data Applications with Electric Imp and ThingSpeak!

Electric Imp is a connectivity platform for connecting Wi-Fi devices to cloud services, much like and Iota Wi-Fi modules and Some Electric Imp module’s come in an SD card form factor and adds Wi-Fi connectivity to what’s connected to the Electric Imp module. Access to the Electric Module happens via the Electric Imp cloud. While connectivity is simplified with the Electric Imp system, you will need a data service like ThingSpeak to complete the Internet of Things experience. Once data from Electric Imp devices are in ThingSpeak, you can easily build applications and interactivity with other devices and platforms.

Electric Imp to ThingSpeak Internet of Things

We put together a quick start tutorial for the Electric Imp and ThingSpeak, so you can quickly and easily get the Electric Imp talking to ThingSpeak. The tutorial uses parts from SparkFun – the Electric Imp Wi-Fi SD module, breakout board, and USB cable / power supply.

Get started now…  Check out the official Electric Imp and ThingSpeak Tutorial and source code on GitHub.

ThingSpeak Java Client for “Internet of Things Applications”

[Andrew Bythell] created a ThingSpeak Java Client for the complete ThingSpeak API. This Java Client makes it really easy for Java (or Processing) developers to add cloud connectivity to applications and non-networked devices. “The purpose of the ThingSpeak Java client is to enable non-networked Device-to-ThingSpeak gateways and other applications for performing advanced analysis of data feeds,” said Andrew.

Java ThingSpeak Client IoT

So, by using Java, a simple “Hello World” app becomes this easy…

Channel channel = new Channel(channelNumber, apiWriteKey);
Entry entry = new Entry();
entry.setField(1, "Hello World");


All of the source code and documentation are available on GitHub. Get started right away with building your Internet of Things with the Java Programming Language and the ThingSpeak Cloud.

Excellent work Andrew – thanks for contributing to the Open Source ThingSpeak Community!

[via Angry Electron / GitHub]

Store, Share, and Visualize Sensor Data using the BrickPi, Raspberry Pi, and ThingSpeak

Dexter Industries launched a very successful Kickstarter campaign this past summer to build and release the BrickPi. The BrickPi turns the Raspberry Pi computer into a robotics and sensing platform for LEGO® MINDSTORMS®. Since the wrap up of the campaign, users have jumped on board making cool projects using the BrickPi including a step-by-step tutorial using ThingSpeak to store, share, and visualize sensor data.

BrickPi Weather Station using ThingSpeak and the Raspberry Pi

Check out the tutorial, “ThingSpeak Temperature with Raspberry Pi“, to learn how to send sensor data using the BrickPi, a Raspberry Pi computer, and a temperature sensor for the LEGO® MINDSTORMS® NXT. The project uses ThingSpeak to store, share, and visualize sensor data collected by BrickPi-enabled projects. The Python code for the Raspberry Pi is available on GitHub and the entire project is open source!

[via  Dexter Industries]

Open Source ThingSpeak Updates

Thanks to the very active ThingSpeak community, we have been able to make some updates to the open source ThingSpeak API and web app. We also have a major new release coming. The latest updates allow ThingSpeak to be installed without dependency on the Internet. This means you can run this on an embedded web server with no Internet connection. This is perfect for when you want to log sensor data behind a firewall and build apps that do not require (or have) remote connectivity.

GitHub ThingSpeak API

We want to send a special thanks to powermikoiotoshi, sekjal, and akinsgre for contributing new code and reporting bugs.

All of the latest code is available on GitHub, so start building your own Internet of Things today!