Banner image credit @jorgedevs on Unsplash.
Blues University is an ongoing series of articles geared towards beginner- and intermediate-level developers who are looking to expand their knowledge of embedded development and the IoT.
The Internet of Things (IoT) is a network of everyday objects, devices, and sensors whose internet connectivity enables them to collect and exchange data. If you've installed a smart thermostat to optimize your home heating or worn a fitness tracker to monitor your health, you've already welcomed IoT into your life!
However, the technology that enables intelligent devices to communicate with each other and the cloud — embedded development — remains somewhat obscure to those of us who grew up building desktop applications, websites, or mobile apps.
Embedded development is the driving force behind the seamless connectivity and functionality of IoT devices. Embedded systems function as the “brains” of IoT devices, powering how they gather, process, and communicate data. With a comprehensive understanding of how embedded systems function, you can unlock the full potential of IoT innovation.
This article is an introductory guide to embedded development in the IoT. We'll explore the significance of the technology, examine its three primary pillars — hardware, firmware, and the cloud — and lay the groundwork for deeper exploration in future articles.
The Pillars of Embedded Development for IoT
Embedded development for IoT is like a live music concert. Just as the concert experience hinges on the cooperation of various physical objects and complex processes, IoT relies on interaction between the three pillars of embedded development: hardware, firmware, and the cloud. Together, they form the foundation upon which you can build robust IoT solutions.
Let's look at the role of each pillar in further depth:
Hardware
Sticking with the analogy of a live concert, hardware is the essential tangible medium — the instruments and the stage. Hardware structures and houses all IoT capabilities and functions. Without a piano, there is no song. Without hardware, there are no “things.”
A basic hardware prototype including a microcontroller, a temperature/humidity sensor, and an SD card reader for data storage.
There are several hardware “instruments” that comprise this category. The following are crucial hardware components.
Microcontrollers and Microprocessors
Microcontrollers and microprocessors are the brains of embedded devices. They process data, make decisions, and control device responses and actions.
A microcontroller is like a custom-built guitar pedal optimized to create a particular effect. It has integrated circuits with a processor, memory, and input/output connectors. Microcontrollers are designed for specific tasks in embedded systems, enabling real-time processing capabilities with minimal power consumption.
In contrast, a microprocessor resembles a keyboard synthesizer that imitates instruments and generates beat loops — less specialized but versatile and powerful. Microcontrollers rely on the general-purpose potency of microprocessors to perform numerous complex functions. Common microprocessors include Arduino, RP2040 from Raspberry Pi, STM32 from STMicroelectronics, ESP32 from Espressif, among many others.
Sensors and Actuators
Sensors and actuators act as the senses and muscles of IoT devices. Sensors gather data from the physical environment, such as temperature, humidity, and motion, while actuators initiate actions based on this data. These components are essential for collecting information and responding to real-world conditions.
Smart thermostats represent one of the most recognizable implementations of sensors and actuators. A sensor gathers information about the temperature and moisture levels in your home. If the room is too warm or humid, the actuator responds by signaling your air conditioner or dehumidifier to power on.
Connectivity Modules
Without connectivity, the Internet of Things is just “things.” Connectivity is the lifeblood of IoT, enabling devices to communicate with each other and the cloud — and connectivity modules provide this capability. Wi-Fi, Bluetooth, Zigbee, LoRa/LoRaWAN, and cellular networks offer varying ranges, data rates, and power consumption profiles.
Learn more about the different cellular protocols available for IoT connectivity.
For home-based devices like smart thermostats and security systems, Wi-Fi connectivity provides a stable means of delivering real-time information to your mobile device and/or to the cloud.
In contrast, consumer-focused mobile IoT devices like fitness trackers and smartwatches often benefit from Bluetooth connectivity, requiring only a short range and minimal power to transmit data to your connected smartphone, which then connects to the cloud via Wi-Fi.
Today, most modern connected products that are in motion, deployed in industrial settings, and/or located in remote areas need a restriction-free wireless connectivity option such as cellular, LoRa/LoRaWAN, or even satellite. The Blues Notecard is an example module that provides Wi-Fi, cellular, LoRa, and satellite options using the same physical footprint and same developer APIs.
The Blues Notecards: Wi-Fi, Cellular, LoRa, Cell+WiFi, and Satellite.
Firmware
With the potential exception of player pianos, instruments don't play themselves. Similarly, IoT hardware lies dormant without its version of musicians and conductors — the firmware (the compiled source code deployed to a microcontroller). As a saxophonist interprets a score and keys their instrument, firmware forms the intelligent intermediary that processes information and responds in real time.
Firmware is the embedded software that runs on microcontrollers and microprocessors. It controls device behavior, manages hardware resources, and facilitates communication between hardware and software components. Let's explore some key aspects of IoT firmware.
Real-Time Operating Systems
A real-time operating system (RTOS) behaves like an orchestra conductor with an impeccably built metronome, ensuring the precisely timed and predictable execution of tasks.
Like computer and mobile device operating systems, an RTOS acts as a medium between physical components and software processes. However, it differs from a traditional OS in its highly specialized design. Whereas macOS, Windows, and Linux must accommodate an immense range of functions, an RTOS completes a small number of tasks with exact timing — sometimes to millisecond precision.
This capability is vital to IoT applications ranging from autonomous vehicles to industrial automation. RTOS examples include FreeRTOS, Zephyr, and NuttX.
Programming Languages
Whatever the medium, communication necessitates language. For a classical orchestra, there's musical notation. For IoT and embedded development, there are several options, each with a distinct role and unique strengths.
You can compare C to traditional staff notation — widely understood and foundational in its field. C is the grandparent of programming languages, time-tested and deeply entrenched in the foundations of embedded systems. Its conciseness and efficiency make it indispensable for developing low-level firmware that necessitates direct manipulation of hardware resources.
C++ builds upon the bedrock of C, introducing object-oriented concepts to enable more complex and reusable code structures. It allows developers to switch between low- and high-level programming paradigms — a flexibility that makes it ideal for more complex IoT devices that benefit from modular design and code reuse.
For safety and security, there's Rust. Designed with safety at its core, Rust features a compiler acting as a vigilant sentinel against common bugs — like memory leaks and data races — that plague system languages. Rust enforces strict type checks and memory safety guarantees, making it a strong candidate for IoT applications where security and reliability are paramount.
Meanwhile, Python is a popular choice for higher-level firmware, particularly when development speed is the priority. MicroPython and CircuitPython are two popular derivatives of Python often used in embedded projects.
Those who are used to developing in more modern languages may be interested in Apple's Embedded Swift or the different platforms available for using .NET.
Regardless of your development background, there is a path forward for you in the embedded space.
Libraries
Libraries are the unifying force of IoT, a glue that binds its diverse components. They facilitate smooth communication between hardware and firmware, simplifying the development process with prebuilt solutions for common tasks. Libraries are like toolboxes, each containing specialized functions tailored to particular tasks.
Most libraries are open source, providing an interface to virtually every component available. Everything from simple temperature/humidity sensors through to wildly complex LCD displays all have supported libraries available.
Libraries are normally installed through the user's IDE, such as Arduino IDE or PlatformIO.
The Cloud
If information is the music of embedded development and IoT, then the cloud is the amplification system that broadcasts it far and wide. The cloud's role in embedded development is expansive, but fundamentally, the network enables the broad communication and data processing capabilities that define IoT. It stores and processes the vast amounts of data that IoT devices generate, enabling remote monitoring, analytics, and device management.
Essentially, IoT is an extension of web development, with its back-ends, front-ends, application programming interfaces (APIs), and cloud services each playing an integral role in how the cloud facilitates IoT communication.
Back-End Development
Back-end development involves creating the server-side infrastructure that handles data storage, processing, and communication between devices and users. It's the backbone of IoT applications, relying on technologies like SQL and NoSQL databases, serverless computing, and containerization platforms.
One of the primary functions of back-end development in embedded systems is to enable remote monitoring and control of devices. Developers create a centralized system that allows users or administrators to access and manage embedded devices remotely. For example, in industrial automation, back-end systems can monitor and control manufacturing equipment, adjusting settings and troubleshooting issues regardless of their proximity to the machines.
Front-End Development
Front-end development focuses on crafting user interfaces (UIs) for monitoring and controlling IoT devices. These interfaces are the windows through which users interact with their devices, providing real-time data, alerts, and control options.
For embedded systems that support remote control or monitoring, front-end development extends to creating web-based or mobile app interfaces. These interfaces enable users to access and control the embedded device over a network or the internet. They often include a responsive design to work across screen sizes and devices.
APIs and Cloud Services
APIs and cloud services act as the bridge between IoT devices and the cloud. APIs define how devices communicate with cloud services, enabling data exchange and remote control. Via popular providers like Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform, cloud services offer the infrastructure for data storage, analytics, and device management.
IoT-specific cloud platforms such as Datacake, Ubidots, and Losant can provide an easier path to the cloud with prebuilt templates and dashboards. Combined with a cloud service like the Blues Notehub, the path from device-to-cloud becomes as simple as a few lines of code.
An example IoT dashboard created with Datacake.
Through APIs and cloud services, embedded systems can provide remote monitoring capabilities. Users, administrators, or system operators can access real-time data, device status, and event logs from anywhere with internet connectivity. This ability is especially valuable in IoT contexts, where large numbers of distributed devices are the norm.
Summary
Embedded development is at the heart of IoT innovation. By understanding its three pillars — hardware, firmware, and the cloud — you can unlock the vast potential of IoT technology.
This article serves as a brief introduction to a broader series where you can dig deeper into each aspect of embedded development. To embark on this journey, be sure to follow Blues University, where you can explore and contribute to shaping the future of IoT.
If you're new to embedded development and the IoT, the best place to get started is with the Blues Starter Kit for Cell + WiFi and then join our community on Discourse. 💙