Introduction to IoT
The Internet of Things (IoT) is a network of physical devices — sensors, actuators, appliances, vehicles, and more — that are embedded with computing hardware and connected to the internet so they can collect, exchange, and act on data with minimal human involvement.
What is IoT?
At its core, IoT bridges the physical and digital worlds. A traditional "thing" — a thermostat, a light bulb, a factory machine — becomes "smart" when it can sense its environment, process data, communicate over a network, and respond to commands or conditions automatically.
# A simple IoT concept in Python pseudocode
class SmartThermostat:
def __init__(self, target_temp=22):
self.target_temp = target_temp
def read_temperature(self):
# In reality: read from DHT22 sensor over GPIO
return 18.5
def decide_action(self):
current = self.read_temperature()
if current < self.target_temp:
return "HEATER_ON"
elif current > self.target_temp + 1:
return "HEATER_OFF"
return "HOLD"
thermostat = SmartThermostat(target_temp=22)
print(thermostat.decide_action()) # HEATER_ONBrief History of IoT
| Year | Milestone |
|---|---|
| 1982 | Carnegie Mellon Coke machine — first internet-connected appliance |
| 1991 | Mark Weiser coins "ubiquitous computing" |
| 1999 | Kevin Ashton coins the phrase "Internet of Things" at P&G |
| 2000 | LG announces the first internet-connected refrigerator |
| 2008 | Number of connected devices surpasses the human population |
| 2010 | Raspberry Pi Foundation formed; maker movement accelerates |
| 2012 | IPv6 rollout enables virtually unlimited device addressing |
| 2015 | Amazon Echo brings voice-activated IoT into homes |
| 2020 | 9.9 billion active IoT connections worldwide |
| 2025 | ~18 billion connected IoT devices globally |
Note: IPv4 supports ~4.3 billion addresses. IPv6 supports 3.4 × 10³⁸ addresses — enough for trillions of devices per person on Earth.
The Four-Layer IoT Architecture
IoT systems are typically described in four layers:
┌─────────────────────────────────────────────┐
│ APPLICATION LAYER │
│ Dashboards · Analytics · Automation │
├─────────────────────────────────────────────┤
│ PROCESSING / PLATFORM LAYER │
│ Cloud (AWS IoT, Azure IoT) · Edge Server │
├─────────────────────────────────────────────┤
│ NETWORK LAYER │
│ WiFi · BLE · Zigbee · LoRa · 4G/5G │
├─────────────────────────────────────────────┤
│ PERCEPTION LAYER (Hardware) │
│ Sensors · Actuators · Microcontrollers │
└─────────────────────────────────────────────┘Each layer has a specific responsibility:
- Perception — gather real-world data (temperature, motion, pressure)
- Network — transmit that data reliably and securely
- Processing — store, analyze, and make decisions
- Application — present insights and trigger actions
What Can You Build With IoT?
| Domain | Examples |
|---|---|
| Smart Home | Automated lighting, security cameras, smart locks, energy monitoring |
| Healthcare | Wearables, remote patient monitoring, smart pill dispensers |
| Agriculture | Soil moisture sensors, drone irrigation, livestock tracking |
| Industrial | Predictive maintenance, robot control, SCADA systems |
| Transport | Fleet tracking, autonomous vehicles, smart traffic lights |
| Retail | Inventory management, foot traffic analytics, smart shelves |
| Environment | Air quality monitoring, flood detection, weather stations |
| Energy | Smart meters, demand-response systems, solar monitoring |
Why Python for IoT?
Python is one of the most popular IoT programming languages because:
# Python runs everywhere in the IoT stack
# 1. On a Raspberry Pi (full Python 3)
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
# 2. On ESP32/ESP8266 (MicroPython)
from machine import Pin
led = Pin(2, Pin.OUT)
# 3. On the cloud (data pipelines, APIs)
import boto3 # AWS IoT
client = boto3.client('iot-data')
# 4. For data analysis
import pandas as pd
df = pd.read_csv('sensor_data.csv')
print(df['temperature'].mean())| Feature | Why It Matters for IoT |
|---|---|
| MicroPython | Runs on resource-constrained microcontrollers |
RPi.GPIO | Direct hardware access on Raspberry Pi |
paho-mqtt | Industry-standard MQTT client |
requests | Communicate with HTTP APIs and cloud services |
pandas, numpy | Analyze time-series sensor data |
flask, fastapi | Build IoT backends and dashboards |
IoT vs Traditional Computing
| Aspect | Traditional Software | IoT |
|---|---|---|
| Interaction | User-driven | Event-driven (sensor triggers) |
| Environment | Controlled (data center, desktop) | Harsh (heat, humidity, vibration) |
| Connectivity | Always-on broadband | Intermittent, low-bandwidth |
| Power | Mains/UPS | Battery, solar, harvested |
| Scale | Hundreds of servers | Millions of edge devices |
| Updates | Easy (CI/CD pipelines) | Complex (OTA, physical access) |
| Security | Well-understood | Still evolving, often neglected |
Key IoT Statistics (2025)
- ~18 billion IoT devices connected globally
- $1.1 trillion IoT market size projected by 2028
- 41.6 billion devices expected by 2030 (IDC)
- 70% of organizations have at least one IoT deployment
- Manufacturing is the largest adopter, followed by transportation and utilities
Summary
- IoT connects physical devices to the internet to enable sensing, communication, and automation
- Kevin Ashton coined the term in 1999; the ecosystem has exploded since
- The four-layer architecture: Perception → Network → Processing → Application
- Applications span smart homes, healthcare, industry, agriculture, and more
- Python is a first-class citizen across all layers of the IoT stack
- IoT differs from traditional software in power constraints, intermittent connectivity, and scale
In the next topic, we will explore the complete IoT ecosystem — hardware platforms, cloud services, and the tools that hold it all together.