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.
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.
Press “Get Started Now”
Enter your User name, Email and Password.
Click “New Channel”
You can change the name of the channel and write a description for it.
Here you can visualize your data graphically.
You will find your API key that is used to read or write data
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.
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.
// declaring an object from the HttpRequest with the URL of thing speak api
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 …
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 …
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 …
“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, …
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 …
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. …