How to use ThingSpeak through the Internet Shield to log your data graphically

A couple of days ago, we have released the Internet Shield, welcome to the IoT World!!. The shield has many features to facilitate to the users to access websites or internet APIs to perform get, post, put or delete HTTP requests.

Here is a simple example to log a temperature readings from “LM-35” sensor on ThingSpeak site. So I can check these data from any where around the world.

Thing Speak

First of all, If you aren’t familiar with ThingSpeak, its fine you can get to there website and learn more about it. Basically, it is a great tool used for IoT to let devices as Arduino talk to each other. Here is some screen shots to register on the site.

 

Picture1

Press “Get Started Now”

 

Picture2

 

Enter your User name, Email and Password.

 

 

 

Picture4

 

Click “New Channel”

 

 

Picture5

You can change the name of the channel and write a description for it.

 

 

Picture6

Here you can visualize your data graphically.

 

 

Picture7

 

You will find your API key that is used to read or write data

 

Picture8

The above 2 links used to update the data or read the past results, actually we will use one of them for sending data

“https://api.thingspeak.com/update?key=xxxxxxxxxxxxxxxx&field1=0” ,, but each time we will change field1 to the value of the temperature sensor value as illustrated in the code below.

 

Arduino Sketch

As shown here, the code is so simple. Firstly, we have declared the request with thing speak API. You should enter your key in the add parameter function in the void setup. In the Loop, all we have to do is to get the value of the temperature sensor and then convert from float to array of char and then add it to the URL of the request as a parameter. Finally, we can now perform get for our request to update the new value to our channel and we can see this value on the graph for your channel on thing speak.

 Test

Here is a screen shot for the test I have made.

Capture

 

 




Related Blogs

Arduino Robotics

Arduino Robotics Series, from a car to a robot arm

Arduino keeps standing out from the crowd of all-around development boards due too its ease of use and budget price. As a result, this has enabled almost anyone to get his own idea into life no matter how crazy or even useless to the whole world it was, except for its maker! Also, it has …

Arduino Robot Arm

How to build an Arduino Robot Arm placed on RC Car

Arduino robots are always funny and definitely more enjoyable when combined with robotic arm! And today, I will walk you through the making of a simple Arduino Robot Arm that’s made of cardboard and how you can attach it over your Arduino Bluetooth RC Car / Robot that you have made so far through this series. …

Arduino Line Following Robot

How to build an Arduino Line Following Robot using Cardboard

Arduino Line Following Robot is one of the easiest and most well-known projects that anyone can make to learn the basics of programming, electronics, and mechanics all in one project. It’s known that this project is common for most of the makers and tech students and today I am going to give it a revisit …

Arduino Obstacle Avoiding Robot

How to build an Arduino Obstacle Avoiding Robot using Cardboard

Back again with another Arduino Bluetooth RC Car tutorial but with an advanced feature that makes your car autonomous by adding ultrasonic sensors to the RC Car you have made before!. Yeah, I know that you may have seen other tutorials using ultrasonic to make the car/robot avoid obstacles ahead, but I am going to …

Arduino Bluetooth RC car

How to make an Arduino Bluetooth RC Car using Cardboard

  Cardboard crafts are one of the most popular and easy to make DIY stuff. Mixing this with the unmatchable enjoyment of RC Cars and the ease of using Arduino, I am going to show you how to make a Cardboard Arduino Bluetooth RC car that you can control via Bluetooth from your smartphone.  …

Arduino Security Camera

Arduino Security Camera System (Arduino Home Hacks #4)

Arduino Security Camera Have you ever wanted to check your home in real time? Afraid that maybe someone has stormed in, don’t remember if you shut the door or not or maybe wanna check if your Hyper-energetic dog has broken any of your dishes AGAIN!! 🙂 Then this is the perfect place for you cause today …