Internet of Things (IoT) has been all the rage over the past years. The extensive use of sensors and wireless connectivity amongst devices has increased to the trend. This increase in trend has changed our day to day life to a much greater extent. For e.g. we can now have control of our room’s air conditioner from the comfort of our bed even if we forget the remote in the other end of the room. 

IoT with the help of cloud computing serves to increase efficiency in our everyday tasks, and the two have a relationship with each other. The IoT generates a massive amount of data and the cloud helps to store the data with ease. This blog gives you a better understanding of a real-life application of IoT using cloud computing.

Cloud computing 

Cloud computing is an on-demand availability of computer system resources, used for data storage without direct active management by the user. It helps to reduce the server cost and maintenance, provides increased speed and agility.

It also allows easy deploying of applications to multiple locations in the world at a time, and an easy data backup making it one of the most popular ways of storing data. 

Some of the most popular cloud service providers are

  1. Google Cloud
  2. AWS

There are many ways of building real-time applications in cloud computing.

In this blog, we will see an IoT example using Google’s firebase cloud and a Raspberry Pi machine.

Why use cloud computing for IoT

Assume that you are sitting in a room with fifty persons like in your workplace and there is only one washroom available to use. Now if you want to use it you need to check its availability at that time. For that, you need to go again and again to see if it is available for your use. This is one of the most tedious jobs and also will occupy your time a lot. Using IoT based cloud computing, we can solve this problem and the washroom availability will be available at your fingertips.

Real-life IoT example using cloud computing

The block diagram below gives some basic information about the application

IoT and cloud computing go hand in hand with each other. Cloud services give a boost to the IoT systems. There are some cloud services that give services for a certain amount of time & some give services on the number of reads and writes. Each service will charge after a certain amount of time and they will charge differently. You need to determine your use case and the application for which you are building.

In this application, we will be using a Raspberry Pi machine to check the state of the toilet like whether it is vacant or occupied using a magnetic sensor. The magnetic sensor will generate a signal when the two magnets are close to each other and the machine will use the signal to determine whether the door is open or closed and it will send the data to the firebase cloud. 

The machine will also update the data on the cloud if there is any change in the state of the door. Now we have created a way to record the latest state of the room by sending the data to the cloud. This process is called as sending data. 

Now we have to retrieve the data from the cloud to check the state. We can do this in multiple ways. In this project, we have created an HTML page that retrieves the data using JavaScript.

We can place the file on the local servers or on a website and through that, we can get the live status of the room by just hitting the respective website or from the HTML file. 

This is just one of the ways of using cloud computing. We can extend the use of the same to any limits.

One of the examples would be that we can get the IDs of a person and their data and store them in the cloud. Now we could give access to only those persons whose IDs have been registered. There are many real-life IoT examples which you can think of, like weather stations, Air Pollution Monitoring System, Night Patrolling Robots, etc.

Sample Screenshots and information on the project

You can also refer the following links to see the code used