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 IoT

Arduino IoT Shield Functions Explainer

Arduino makers …. you can connect your Arduino to MQTT brokers(servers) and launch your IoT with Arduino IoT Shield! It’s the 1Sheeld IoT shield that will do the job for you. It’s one of the most important but recent Arduino shields in 1Sheeld. Simply, it turns your Arduino into MQTT client where you can publish and …

Arduino Temperature Humidity System

IoT Arduino Temperature and Humidity System

Monitor my home environmental parameters remotely is one of the most desirable things I have ever wanted to make. It’s not about purchasing such a system that can get the job done for me. But, passion to create it myself. So, today, I am going to connect the popular DHT sensor to an online MQTT …

Arduino Door Lock

IoT Arduino Door Lock using 1Sheeld and Smartphone

  “Oh God! … It seems like I have forgotten the door lock open, again” … the normal saying whenever I am in hurry to go out! Have you encountered this problem before? It always confuses me since I may even think that I have left the door lock opened, and once I go back, …

IoT Fan Control

Arduino IoT Fan Control using 1Sheeld and Smartphone

Here I am with another IoT-based home automation project; Arduino IoT Fan Control. Every day, I get back from work tired and feeling hot. No air conditioner here and the fan takes much time to start cooling the room, sadly! So, I was thinking why not controlling the fan from outside my home with my …

Arduino Light Control

IoT Arduino Light Control using 1Sheeld and Smartphone

Have you ever forgotten to turn your home lights off when you got outside? Sadly, it happens to me all the time. And this causes confusion once I get my bills! Furthermore, here is one secret about me; I am a lazy man. I always want to control my room lamp from my sweet bed. …

Arduino Plant Watering System

Arduino Plant Watering System (Arduino Home Hacks #3)

Welcome to our home automation hacks series #3, for so many times I had problems with watering my plants while traveling abroad and I have always needed a way to control it remotely, then I decided to do it with one of the fanciest ways you may ever hear off, cause I’m gonna water my …