The software and the programming languages on which IoT works uses very common programming languages that programmers use and already know. So which language should be chosen?
Firstly, because embedded systems have less storage and processing power, their language needs are different. The most commonly used operating systems for such embedded systems are Linux or UNIX-like OSs like Ubuntu Core or Android.
IoT software encompasses a wide range of software and programming languages from general-purpose languages like C++ and Java to embedded-specific choices like Google’s Go language or Parasail.
Here’s a quick overview of each one of IoT Software:
C/C++: The C programming language has its roots in embedded systems. C or C++ can be used almost everywhere and many programmers already know it. C++ is the object-oriented version of C, which is a language popular for both the Linux OS and Arduino embedded IoT software systems. These languages were basically written for the hardware systems which makes them so easy to use.
Java: While C and C++ are hardware specific, the code in Java is more portable. It is more like a write once and read anywhere language, where you install libraries, invest time in writing codes once and you are good to go.
The set of programs that help you get the activities done like the data collection, processing, storage and evaluating instructions based on the processed data from the IoT Software. Operating Systems, firmware, applications, middleware are some of the examples that fall into this category.
IoT software addresses its key areas of networking and action through platforms, embedded systems, partner systems, and middleware. These individual and master applications are responsible for data collection, device integration, real-time analytics, and application and process extension within the IoT network.
Python: There has been a recent surge in the number of python users and has now become one of the “go-to” languages in Web development. Its use is slowly spreading to the embedded control and IoT world like the Raspberry Pi computer. Python is an interpreted language, which is, easy to read, quick to learn and quick to write. Also, it’s a powerhouse for serving data-heavy applications. So, that's why we use Python as our course's programming language.
This software manages sensing, measurements, light data filtering, light data security, and aggregation of data. It uses certain protocols to aid sensors in connecting with real-time, machine-to-machine networks. Then it collects data from multiple devices and distributes it in accordance with settings. It also works in reverse by distributing data over devices. The system eventually transmits all collected data to a central server. Data Collection is used for data filtering, data security, sensing and measurement. It can work both ways by collecting data from devices or distributing data to devices. More about data management and data collection can be found Chapter C7.8.
Software supporting integration binds (dependent relationships) all system devices to create the body of the IoT system. It ensures the necessary cooperation and stable networking between devices. These applications are the defining software technology of the IoT network because without them, it is not an IoT system. They manage the various applications, protocols, and limitations of each device to allow communication.
With as many IoT applications as there are IoT entrepreneurs, it would be impossible to generalize a hardware architecture. But regardless of the application, all IoT devices share some commonalities or “building blocks”, as shown Picture 11 below.
Picture 11. Four Building Blocks of IoT Device Hardware and software. Image credit: Daniel Elizalde
In many IoT products, the “thing” is fully integrated into the smart device. For example, think of products like a smart water pump or an autonomous vehicle. These products control and monitor themselves.
The data acquisition module focuses on acquiring physical signals from the “thing” and converting them into digital signals that can be manipulated by a computer.
This is the hardware component that includes all the sensors acquiring real-world signals such as temperature, motion, light, vibration, etc. The type and number of sensors you need depend on your application. All these operation in done by using some programming language.
The data acquisition module includes more than sensors though. It also includes the necessary hardware to convert the sensor signal into digital information for the computer to use. This includes signal conditioning, analog-to-digital conversion, scaling, and interpretation. And same here, all is done by program code.
The third building block of the device is the data processing module. This is the “computer” that processes the data, performs local analytics, stores data locally, and performs any other computing operations at the edge. Behind all these case are software components.
The last building block of your device’s hardware is the communications module. This is the circuitry that enables communications with your Cloud Platform, and with 3rd party systems either locally or in the Cloud.
This module may include communication ports such as USB, serial (232/485), CAN, or Modbus, to name a few. It may also include radio technology for wireless communications such as Wi-Fi, LoRA, NB-IoT, ZigBee, etc.
The communications module can be included in the same device as your other modules, or it could be a separate device that is specifically for communications. This approach is often referred to as a “gateway architecture”. And again, all operation needs to some or more program code.
Note! IoT software development is a particularly important aspect when developing IoT systems. Mastering and understanding multiple programming languages and software architectures is a necessary skill.
In Chapter 9 you will get a basic understanding of Python programming.
These applications take data or input from various devices and convert it into viable actions or clear patterns for human analysis. They analyze information based on various settings and designs in order to perform automation-related tasks or provide the data required by industry.
These applications extend the reach of existing systems and software to allow a wider, more effective system. They integrate predefined devices for specific purposes such as allowing certain mobile devices or engineering instruments access. It supports improved productivity and more accurate data collection.