lack of data, there may be a chance of incomplete or corrupted data so to overcome such data, and we need preprocessing activity such as cleansing and to do so we use filtering over here. To plot the 2D data at the server end, a Python library MATPLOTLIB can be utilized.
Figure 1.5 Raspberry Pi 4 [24].
Figure 1.6 DHT sensor [29].
In this way, using a DHT sensor with Raspberry Pi, we can monitor the value of humidity and temperature on screen with the help of GUI. Even we can extend/update the script and instruct the rotary motor as an actuator to actuate (start fan) when certain room temperature increases. So, these are some of the modest applications of IoT in real-world environments that can be implemented using Raspberry Pi.
1.5.3 Python
As a lightweight versatile scripting programming language, Python is very much popular and useful in IoT-based application development [25]. It provides some kind of relaxed environment, i.e., it does not follow strict rules. Python-Integrated Development Environment (IDE) provides several modules and libraries, using which one can establish connectivity with many hardware and also compatible with multiple OS such as windows, Linux, and MAC. Well-known Python IDEs are Spyder and PyCharm.
To perform file operation in Python, we do not require any separate library, and it is an in-built function such as open(), read(), write(), and close(). Python supports various file formats to perform such operations like .Txt file and .CSV file. This feature makes data management easier using python programming language. If our data file is of the type of image, then we have a Python Image Library (PIL) to do the process with such a file. In this library, there are famous functions/methods like open(), show(), resize(), rotate(), print(), and convert() to do various tasks on such images that are contained in an image file.
Python also supports client-server architecture model and provides necessary network services to it. Socket programming in Python allows us to implement clients and servers for connection oriented as well as connection less protocols. In socket programming of Python, we have to import “socket” and “sys” libraries that contain well-known and most utilized functions for example connect(), send(), and listen() using which one can establish connection between clients (IoT nodes) and server. Python has also a separate library that provides and deals with a specific application level network protocol(s).
Thus, Python is a versatile object oriented programming language that provides an easy environment in open source community software for the development of IoT-based applications.
1.6 IoT Applications
With the collaboration and co-operation of other technology involved with IoT, it has vast scope in various IoT-based applications such as Smart Home, Smart Healthcare, Smart Transportation, Smart Asset Management, and Smart Farm [26]. Such applications will create a paradigm shift in the traditional lifestyle of human beings and that is why nowadays the popularity of IoT is much more than other existing technologies. Some of the well-known IoT applications are as given below.
Smart Home
Smart home as an IoT application contains features like integration of various IoT-enabled devices, provides securities amongst them, and enables networking using central controlled devices and its related security features that adapt a traditional home into technically enriched sophisticated home. Such IoT-enabled devices monitor some important aspects for home such as remote air conditioning, heating, and ventilation management using smart phones. It also performs the operation management by communicating with different IoT-enabled devices of home like IoT-enabled fan, tube light, oven, and washing machine.
Smart Healthcare
Such smart healthcare applications are also known as the Internet of Medical Things (IoMT). Its popular applications are “Remote Health Monitoring” and “Emergency Notifications System” [27]. There are many devices that can monitor the number of health parameters of human beings. IoT-enabled devices, by collaborating communication with medical manifesto, can monitor the heartbeat and blood pressure and, with proper medical surgery, can also act as pacemaker. “Smart Bed” is an instrumental bed which maintains a patient’s regular checkups without any human intervention (nurse). Moreover, such smart beds can also be connected using smart sensors that can acquire information from the patient end and analyze and transmit them to smart home objects connected to this system. To monitor the well-being of senior citizens, smart sensors can also be medically equipped within living spaces of human beings.
Smart Transportation
In different aspects of the transportation system, IoT is helpful in doing things more smartly than done earlier. IoT-enabled devices can be equipped with vehicles, infrastructures, drivers and other human beings involved in transporting activities and can play the role of a monitor or supervisor. So, logistics, smart traffic control, vehicle control, and fleet management are several well-known applications of the Smart Transportation segment. During transportation of any goods container, it can be handled by monitoring the real-time location of the container, the status of the container (open/close), and how the container can be handled throughout the journey. So, such smart tracking can provide security features to that container and thereby minimize the theft risk and maximize the possibilities of recovering stolen material.
Smart Asset Management
Asset management is one the oldest problems faced by many industries. Asset is basically an instrument or a device that may be cheap or priceless, that may be located indoor or outdoor. So, in case of an emergency, it is often a problem finding/tracking its location in the organization. IoT can provide solutions toward pinpointing the asset’s exact location within a short span of time. For example, in hospitals, there are many assets such as medical instruments, scanning machines, and healthcare monitors loosely coupled with each other. So, by using IoT-enabled solutions, one can correlate them technically and upload the data on cloud to monitor its future activities such as scheduled maintenance without intervention of human beings.
There are many other domains too in which IoT can be applied to operate things better and smarter such as Smart Retailing, Smart Inventory Management, Smart Tracking, and Smart Cargo Management. In industries, the IIoT can be applied. That is one of the reasons for Industrial Revolution 4.0. So, in the context of industries IoT, we have other broad domains in which IoT can be served. Such domains are Smart Factory, Food Industries, Plant securities and safety, Oil Chemical and Pharmaceutical Industries, Unmanned Auto Vehicle industries (UAVs), and many more. The domain of agriculture also utilizes IoT facilities in different sub-applications and converts the agriculture farm into a Smart Farm. So, in the next sub-topic, we shall discuss how premium facilities can be developed in traditional farms and how one can use IoT technology to convert a farm into a Smart component of sustainable agriculture.
Smart Farm—A Paradigm Shift in Sustainable Agriculture
Smart Farm is an IoT application that gives leverage to the farmer community to do many farm level tasks using IoT without human intervention or minimal human intervention. Smart Farm consists of a variety of functions such as water level management, soil fertility management, pesticides control, and many more. IoT-enabled devices can be useful to fulfill the basic communication functionality that result into performing smart work in the agriculture domain at farm level.
In future, smart farms can have the facilities such as soil moisture and water level monitoring, automated irrigation system, automated sowing and weeding system, automated organic waste management system, automated environment monitoring system, and soil micronutrients monitoring system as shown in Figure 1.7.
✓ Out of these systems, IIT Kharagpur, India, developed an automated irrigation system, “AgriSens” that focused on Smart Water