Projects

What is IoT and embedded system?

An embedded system is a dedicated computer built into a device; IoT connects such devices to networks. Learn how the two relate, with examples and protocols.

On this page
  1. The short answer
  2. What is an embedded system?
  3. What is the Internet of Things?
  4. How IoT and embedded systems relate
  5. Examples of IoT devices (and the embedded system inside each)
  6. How IoT devices communicate
  7. Is Python or C++ better for embedded and IoT work?
  8. Security is part of the design
  9. How to start learning both

The short answer

An embedded system is a small computer built into a larger device to do one dedicated job, such as controlling a washing machine, reading a sensor or running a car’s anti-lock brakes. The Internet of Things (IoT) is the network of physical devices that use embedded systems plus connectivity to send data to, and receive commands from, other devices, apps or cloud services.

Put simply, the embedded system is the brain inside the device, and IoT is what happens when you connect those brains to a network. Every IoT device contains at least one embedded system, but plenty of embedded systems are never connected to anything.

What is an embedded system?

An embedded system combines hardware and software to perform a specific function inside a product. Unlike a laptop, which can run whatever software you install, an embedded system usually runs a single firmware image written for that product. You’ll find them in microwaves, thermostats, printers, pacemakers, industrial controllers, drones and cars, which often contain dozens of them.

Most embedded systems share a few traits:

  • Dedicated purpose. They do one job, or a small set of related jobs.
  • Constrained resources. Memory, processing power and energy budgets are often small, sometimes kilobytes of RAM and a coin cell battery.
  • Interaction with the physical world. They read sensors and drive outputs such as motors, relays, LEDs and displays.
  • Timing requirements. Many have to respond within a set time, not just eventually.
  • Long, unattended operation. They’re expected to run for years without anyone restarting them.

What’s inside one

A typical embedded system includes:

  • A processor, usually a microcontroller (MCU) that combines a CPU core, flash memory, RAM and peripherals on one chip. Examples include the STM32, ESP32, AVR (as used on the Arduino Uno) and RP2040 families. More capable devices use a microprocessor running embedded Linux.
  • Peripherals such as GPIO pins, timers, analog-to-digital converters (ADCs), and serial interfaces like UART, I2C and SPI.
  • Sensors and actuators connected to those peripherals.
  • Power circuitry: regulators, battery management and protection.
  • Firmware: the software, written mostly in C or C++, that runs either directly on the hardware (“bare metal”) or on top of a real-time operating system (RTOS) such as FreeRTOS or Zephyr.

If you want to see what “running directly on the hardware” looks like in practice, our bare-metal STM32 LED blink tutorial builds a working program from nothing but register writes.

The four types of embedded systems

Embedded systems are often grouped into four types by how they operate:

  1. Standalone embedded systems work on their own without a host computer or network. A digital watch, a calculator or a basic microwave controller are typical examples.
  2. Real-time embedded systems must respond within a defined deadline. In hard real-time systems, such as airbag controllers, a missed deadline counts as a failure. In soft real-time systems, such as video streaming, an occasional late result degrades quality but doesn’t cause harm.
  3. Networked embedded systems connect to a wired or wireless network to share data. Most IoT devices fall into this group.
  4. Mobile embedded systems are portable, battery-powered devices such as fitness trackers, handheld scanners and digital cameras.

These categories overlap. A fitness tracker is mobile, networked and has some real-time requirements all at once. Some textbooks also classify embedded systems by scale (small, medium and sophisticated), based on processor size and software complexity.

What is the Internet of Things?

The Internet of Things is the idea, and by now the reality, of everyday physical objects that collect data and communicate over networks. A “thing” can be a smart plug, a soil moisture sensor in a field, a vibration sensor on a factory motor or a connected insulin pump.

What makes something part of IoT isn’t the device alone. It’s the whole system around it: the device senses or acts, a network carries the data, and software somewhere turns that data into something useful, such as a dashboard, an alert or an automatic action.

The layers of an IoT system

IoT systems are commonly described in layers:

Layer What it does Examples
Device (perception) Senses the environment or acts on it Temperature sensor node, smart lock, motor controller
Connectivity Moves data off the device Wi-Fi, Bluetooth Low Energy, Zigbee, Thread, LoRaWAN, cellular
Edge / gateway Aggregates, filters or processes data near the devices Home hub, industrial gateway, Raspberry Pi running local software
Cloud / application Stores, analyzes and presents data, sends commands back Dashboards, mobile apps, analytics, automation rules

The embedded system lives mostly in the device layer, and often in the gateway too.

How IoT and embedded systems relate

The clearest single difference is connectivity. A pacemaker that only regulates heart rhythm is an embedded system. Give it a radio that sends heart-rate data to a clinic, and it becomes part of an IoT system. The embedded hardware and firmware are still there; the network turns it into a connected device.

Comparison table

Embedded system IoT
What it is A dedicated computer inside a device A network of connected devices plus the software behind them
Scope One device Devices, network, gateways and cloud or apps together
Connectivity Optional, often none Essential
Main concerns Real-time behavior, reliability, cost, power All of those, plus networking, data handling, remote updates and security at scale
Typical examples Microwave controller, car engine control unit, digital watch Smart thermostat with an app, connected factory sensors, fleet trackers
Skills involved C/C++, electronics, microcontroller peripherals, RTOS Embedded skills plus networking, protocols, cloud services and security

Edge cases

The boundary isn’t always neat:

  • Embedded Linux devices. Smart speakers, routers and many security cameras run Linux on a microprocessor rather than bare-metal firmware on a microcontroller. They’re still considered embedded systems because they’re built for a dedicated purpose.
  • Smartphones. They’re full of embedded subsystems (the modem, power management, sensors), but the phone itself is a general-purpose computer and usually isn’t called an embedded system.
  • Appliances that went online. Many washing machines, ovens and cars started as purely embedded products and gained connectivity in later models. The core control electronics often stay much the same; the connectivity is added around them.

Examples of IoT devices (and the embedded system inside each)

Five common IoT devices, and what’s doing the work inside:

  1. Smart thermostat. A microcontroller reads temperature and humidity sensors, runs the heating schedule, drives the display and talks to the home network over Wi-Fi or Thread.
  2. Wearable fitness tracker. A low-power MCU reads an accelerometer and an optical heart-rate sensor, runs step and sleep algorithms, and syncs to a phone over Bluetooth Low Energy.
  3. Smart plug. A small Wi-Fi or Zigbee-enabled MCU switches a relay and, in some models, measures energy use.
  4. Video doorbell. A more powerful processor, often running embedded Linux, handles the camera, video compression and streaming, and a motion sensor wakes it up.
  5. Industrial vibration sensor. A battery-powered node samples an accelerometer on a motor or pump and sends summary data over a low-power network such as LoRaWAN or cellular IoT, so maintenance can be planned before a failure.

For buildable versions of ideas like these, see our list of embedded systems and IoT project ideas.

How IoT devices communicate

IoT devices need two things to communicate: a way to move bits (the radio or wired link) and an agreed format for messages (the application protocol).

Common links:

  • Wi-Fi: high data rates and direct internet access, but relatively power-hungry.
  • Bluetooth Low Energy (BLE): short range and low power, common for wearables and phone-connected gadgets.
  • Zigbee and Thread: low-power mesh networks for home automation. Thread is one of the network layers used by the Matter smart home standard.
  • LoRaWAN: long range and very low data rates, used for sensors spread over large areas such as farms and cities.
  • Cellular IoT (LTE-M, NB-IoT): wide-area coverage using mobile networks, used for trackers and remote meters.
  • Wired options such as Ethernet, RS-485 and CAN bus, which are common in industrial and automotive systems.

Common application protocols:

  • MQTT: a lightweight publish/subscribe protocol where devices send messages to a broker. It’s one of the most widely used protocols in IoT.
  • CoAP: a compact request/response protocol designed for constrained devices.
  • HTTP/HTTPS: heavier, but simple and universally supported, often used for REST APIs and firmware downloads.

Choosing between them comes down to range, data rate, power budget and what the rest of the system already uses.

Is Python or C++ better for embedded and IoT work?

It depends on which part of the system you’re working on.

  • On microcontrollers, C and C++ dominate. They give precise control over memory and timing, produce small and fast code, and are what vendor SDKs and RTOSes are written in. Most professional firmware is written in C, with C++ increasingly common.
  • MicroPython and CircuitPython run on boards such as the ESP32 and Raspberry Pi Pico. They’re excellent for learning and quick prototypes, but use more memory and give less predictable timing, so they’re less common in shipping products.
  • On gateways and in the cloud, Python is very common, alongside languages like Go, JavaScript and Java.
  • Rust is gaining ground in embedded development for its memory-safety guarantees, though its ecosystem is younger than C’s.

If you want a career in embedded systems, learn C first. If you mainly want to prototype IoT ideas quickly, MicroPython is a reasonable place to start, and you can move to C or C++ when you hit its limits.

Security is part of the design

Connecting a device to a network exposes it to attack in a way a standalone embedded system never was. Some well-known IoT botnets spread largely by logging into devices that still used factory-default passwords. Basic good practice for connected devices includes:

  • No shared default passwords; unique credentials per device.
  • Encrypted communication, for example MQTT or HTTP over TLS.
  • Signed firmware updates and, where the hardware supports it, secure boot.
  • A way to deliver security updates over the device’s lifetime.
  • Collecting only the data the product actually needs.

Regulators are increasingly requiring this. The UK’s product security rules, in force since 2024, ban universal default passwords on consumer connected devices, and the EU’s Cyber Resilience Act is phasing in security requirements for products with digital elements over the next few years. If you’re building a product for sale, check the current rules in each market you plan to sell in.

How to start learning both

The quickest way to understand the relationship is to build something that has both halves: a microcontroller doing embedded work and a network connection turning it into an IoT device.

  1. Start with the embedded half. Blink an LED, read a button and talk to a sensor over I2C. If you want to see what happens beneath the libraries, try our register-level STM32 LED blink.
  2. Add connectivity. An ESP32 is a good choice because Wi-Fi and Bluetooth are built in. Our step-by-step guide to building an ESP32 weather station takes you from a sensor reading to a web page on your network.
  3. Pick a bigger project. Browse our embedded systems project ideas for builds sorted by skill level, from first projects to RTOS work and OTA updates.

The complete guide to projects

Good Embedded Systems Project Ideas
Read the guide

Keep exploring

Guides from other topics

All topics →