Getting Started

Introduction to IoT

Learn what the Internet of Things is, its history, core architecture, and why it is transforming industries from healthcare to manufacturing.

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.

python
# 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_ON

Brief History of IoT

YearMilestone
1982Carnegie Mellon Coke machine — first internet-connected appliance
1991Mark Weiser coins "ubiquitous computing"
1999Kevin Ashton coins the phrase "Internet of Things" at P&G
2000LG announces the first internet-connected refrigerator
2008Number of connected devices surpasses the human population
2010Raspberry Pi Foundation formed; maker movement accelerates
2012IPv6 rollout enables virtually unlimited device addressing
2015Amazon Echo brings voice-activated IoT into homes
20209.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?

DomainExamples
Smart HomeAutomated lighting, security cameras, smart locks, energy monitoring
HealthcareWearables, remote patient monitoring, smart pill dispensers
AgricultureSoil moisture sensors, drone irrigation, livestock tracking
IndustrialPredictive maintenance, robot control, SCADA systems
TransportFleet tracking, autonomous vehicles, smart traffic lights
RetailInventory management, foot traffic analytics, smart shelves
EnvironmentAir quality monitoring, flood detection, weather stations
EnergySmart meters, demand-response systems, solar monitoring

Why Python for IoT?

Python is one of the most popular IoT programming languages because:

python
# 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())
FeatureWhy It Matters for IoT
MicroPythonRuns on resource-constrained microcontrollers
RPi.GPIODirect hardware access on Raspberry Pi
paho-mqttIndustry-standard MQTT client
requestsCommunicate with HTTP APIs and cloud services
pandas, numpyAnalyze time-series sensor data
flask, fastapiBuild IoT backends and dashboards

IoT vs Traditional Computing

AspectTraditional SoftwareIoT
InteractionUser-drivenEvent-driven (sensor triggers)
EnvironmentControlled (data center, desktop)Harsh (heat, humidity, vibration)
ConnectivityAlways-on broadbandIntermittent, low-bandwidth
PowerMains/UPSBattery, solar, harvested
ScaleHundreds of serversMillions of edge devices
UpdatesEasy (CI/CD pipelines)Complex (OTA, physical access)
SecurityWell-understoodStill 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.