Overview of Firmware and IoT Networking
- Starter
- Article
- Ages 10+
- 4 min read

Firmware is the program that is built and then flashed onto an IoT device's board. In an Arduino sketch, setup() runs once and loop() repeats continuously; other firmware frameworks can use a different structure. To send data over a network, a device can use a lightweight protocol such as MQTT, and NIST has guidance for manufacturers.
Contents
- Board running firmware
- Server on the network
What you will learn
- Say how firmware is built and flashed.
- Understand the setup() and loop() cycle.
- Explain why MQTT suits IoT devices.
Before you start
It helps to know what an ESP32 or Arduino board is.
How is firmware built and flashed?
ESP-IDF is the official development framework for the ESP32 series of chips. A simple example shows how to build and flash firmware onto an ESP32 board.
- Computer with ESP-IDF
- Built firmware
- ESP32 board
How do setup() and loop() run?
The setup() function runs once when the sketch runs. The loop() function repeats continuously.
- setup() runs once
- loop() runs
- Back to loop()
How does MQTT put data on the network?
MQTT is a Client Server publish/subscribe messaging transport protocol. MQTT is light weight, open, simple and designed to be easy to implement. At QoS 2, message delivery is exactly once in the protocol exchange; this alone does not guarantee exactly-once application processing end to end.
On security, NIST publishes guidance for manufacturers and supporting parties creating IoT devices and products.
- Publishing device
- MQTT server
- Subscriber
- Security guidance
Real-world example
With an adult, think of a soil moisture sensor. In this hypothetical example, an Arduino sketch reads the sensor in loop(), then sends the reading over MQTT for an app to show.
Common misunderstandings
Every firmware uses setup() and loop(). Those functions describe the Arduino sketch structure; other frameworks, such as ESP-IDF, use different program structures.
MQTT is a heavy protocol, hard to use on small devices. MQTT is light weight, open, simple and designed to be easy to implement.
Frequently asked questions
What is ESP-IDF?
The official development framework for the ESP32 series of chips.
How do setup() and loop() differ?
setup() runs once, while loop() repeats continuously.
What is MQTT?
A publish/subscribe messaging transport protocol.
Who publishes security guidance for IoT devices?
NIST publishes guidance for manufacturers and supporting parties.
Summary
Terms in this article
English and Vietnamese terms, with the meanings used here. Hover, tap or Tab to a term with a dotted underline for an explanation as you read.
- Firmware
- A program that is built and then flashed onto a device's board.
- ESP-IDF
- Espressif's official development framework for ESP32 chips.
- setup() and loop()setup() và loop()
- The two functions of an Arduino sketch: one runs once, the other repeats continuously.
- MQTT
- A lightweight publish/subscribe messaging transport protocol.
- Quality of serviceChất lượng dịch vụ
- MQTT message delivery levels: QoS 0 at most once, QoS 1 at least once, and QoS 2 exactly once at protocol level.
This article is not marked as viewed
Spotted something wrong or unsafe?
Tell the administrator by email. The message already has the article title and address.
You may also like
BasicHow Does an ESP32 Board Run and Communicate?
An ESP32 board pairs an ESP32 module with a USB port and pin headers. See its parts, how firmware is loaded over serial, and its Wi-Fi and Bluetooth.
Internet of Things (IoT)4 min read
StarterOverview of ESP32, Arduino and Other Boards
An overview of ESP32 and Arduino boards and how to choose by connectivity, voltage, power and microcontroller.
Internet of Things (IoT)4 min read
BasicHow Does Modbus RTU Exchange Data?
Modbus RTU works by request and response between a master and slaves. See addresses, function codes, error checks and how frames are split by silent gaps.
Internet of Things (IoT)4 min read
BasicHow Does RS-485 Transmit Differential Signals?
RS-485 sends signals over two wires and compares the voltage between them, so it resists noise, reaches far and lets many devices share one line.
Internet of Things (IoT)4 min read
Sources
These sources are written for older readers. If they feel hard, read them with an adult.
- ESP-IDF Programming Guide(opens in a new tab)
Espressif SystemsTier C: other sourcesRead on October 29, 2026
- ESP-IDF Get Started(opens in a new tab)
Espressif SystemsTier C: other sourcesRead on October 29, 2026
- Arduino programming (Internet of Things tutorial)(opens in a new tab)
Edinburgh Napier UniversityTier A: government, standards or research bodiesRead on October 29, 2026
- MQTT Version 5.0(opens in a new tab)
OASISTier C: other sourcesRead on October 29, 2026
- NIST Cybersecurity for IoT Program(opens in a new tab)
NISTTier A: government, standards or research bodiesRead on October 29, 2026
