Advanced Arduino & IoT Systems
Course At a Glance
Category
Robotics & Embedded
Level
Advanced
Age Group
16β18 years
Prerequisite
Arduino (Int.) or equiv.
Duration
32 Hours
Modules
4 Modules
Program Outcomes
By the end of this course, students will be able to:
- 1
Design advanced embedded systems using microcontrollers such as Arduino and ESP32.
- 2
Connect devices to the internet and implement IoT communication protocols (HTTP, MQTT, WebSockets).
- 3
Collect, transmit, and visualise real-time sensor data through cloud platforms.
- 4
Develop a complete IoT solution demonstrating automation, remote monitoring, and system integration skills.
Advanced Microcontrollers & System Architecture
Students move from Arduino Uno to the ESP32, mastering hardware interrupts, hardware timers, FreeRTOS multitasking, advanced I2C/SPI peripherals, and SD card data logging.
| # | Lesson Title | What Students Learn | Activity / Project | Key Code / Platforms |
|---|---|---|---|---|
| 1.1 | Review & Advanced C/C++ Concepts | Extend C/C++ knowledge with pointers, structs, enums, and the preprocessor. Understand Flash vs. SRAM optimisation. | Code Modernisation: Refactor an intermediate project using structs for sensor data and enums for state machines. | struct, enum, const vs #define, pointer basics, sizeof(), SRAM optimisation |
| 1.2 | Hardware Interrupts | Use Interrupt Service Routines (ISRs) to detect fast events immediately without polling in loop(). | Build: 'Interrupt-Based Pulse Counter' β increment a volatile counter on RISING edge and compare accuracy vs polling. | attachInterrupt(), digitalPinToInterrupt(), RISING/FALLING/CHANGE, volatile, ISR |
| 1.3 | Timers & Hardware PWM | Generate precise PWM signals independently of the CPU using hardware timers (TimerOne). | Build: 'Precision PWM Controller' β adjust a 1kHz PWM signal while a hardware timer interrupts to blink an LED exactly every 500ms. | #include <TimerOne.h>, Timer1.initialize(), Timer1.pwm(), Timer1.attachInterrupt() |
| 1.4 | Introducing the ESP32 | Explore the dual-core ESP32 (Wi-Fi, Bluetooth, 12-bit ADC). Setup ESP32 in Arduino IDE. | ESP32 First Programs: Flash Blink to ESP32. Read an analog value on the 12-bit ADC (0-4095) and rewrite an analog dimmer. | ESP32 pinout, 12-bit ADC (0β4095), analogReadResolution(12), dual-core concepts |
| 1.5 | ESP32 Multitasking with FreeRTOS | Create concurrent tasks running on dual cores using FreeRTOS. Communicate between tasks with queues. | Build: 'Dual-Task System' β Core 0 reads temperature, sends to queue; Core 1 reads queue and prints data. | xTaskCreatePinnedToCore(), xQueueCreate(), xQueueSend/Receive(), vTaskDelay() |
| 1.6 | Advanced Sensors: IMU & I2C Devices | Connect an MPU6050 IMU via I2C. Apply complementary filters to combine accelerometer and gyroscope data. | Build: 'Tilt-Controlled LED Bar' β map IMU roll angle (-90Β° to +90Β°) to an LED bar graph display. | #include <MPU6050.h>, Wire.begin(SDA, SCL), accel.x/y/z, complementary filter |
| 1.7 | SPI Communication & SD Card Logging | Use SPI protocol to interface with an SD card. Write timestamped sensor data to CSV files. | Build: 'SD Card Data Logger' β log temp/humidity every 10 seconds to a CSV on the SD card. | #include <SD.h>, SD.begin(CS_PIN), File.open(), File.println(), SPI pins |
| 1.8 | Module 1 Project: Advanced Sensor Hub | Build an ESP32 hub using interrupts, timers, I2C/SPI, and FreeRTOS multitasking. | Project: 'Multi-Sensor Hub' β Task 1 reads sensors, Task 2 logs to SD + OLED. Interrupts handle emergency buttons. | Full Module 1 β FreeRTOS, interrupts, I2C, SPI, SD, OLED, ESP32 |
Internet of Things (IoT) Fundamentals
Students implement the full IoT communication stack: Wi-Fi, HTTP clients/servers, MQTT pub/sub messaging, WebSockets, NTP time sync, and OTA wireless updates.
| # | Lesson Title | What Students Learn | Activity / Project | Key Code / Platforms |
|---|---|---|---|---|
| 2.1 | Wi-Fi Fundamentals on ESP32 | Connect ESP32 in Station mode. Handle connection logic, auto-reconnects, and retrieve IP/RSSI. | Build: 'Wi-Fi Connection Manager' β attempts connection, shows status on LEDs, and prints signal strength periodically. | WiFi.begin(ssid, pass), WiFi.status(), WiFi.localIP(), WiFi.RSSI(), WL_CONNECTED |
| 2.2 | HTTP Client: Fetching Web Data | Make HTTP GET requests to REST APIs. Parse JSON responses with ArduinoJson. Handle HTTP status codes. | Build: 'Online Weather Display' β fetch Open-Meteo API data, parse JSON, and display temp/weather icon on OLED. | #include <HTTPClient.h>, http.GET(), ArduinoJson, doc["key"], http.end() |
| 2.3 | HTTP Server: Web-Based Control Interface | Run a local web server serving HTML. Handle GET route requests to trigger hardware actions. | Build: 'Web Control Panel' β serve a dashboard that displays live temperature and toggles ESP32 LEDs via HTTP requests. | WebServer server(80), server.on("/route", handler), server.send(200, content) |
| 2.4 | MQTT Protocol & Pub/Sub Messaging | Understand MQTT brokers, topics, and QoS. Publish sensor data and subscribe to command topics. | Build: 'MQTT Sensor Publisher' β publish temperature to HiveMQ. Subscribe to an LED topic and control it via MQTT Explorer. | #include <PubSubClient.h>, client.connect(), client.publish(), client.subscribe(), callback |
| 2.5 | WebSockets & Real-Time Communication | Use WebSockets for persistent, bidirectional communication to push live data to web pages without refreshing. | Build: 'Live Sensor Stream' β push temperature data every second to a browser dashboard using AsyncWebSocket. | ESPAsyncWebServer, AsyncWebSocket, ws.textAll(), onEvent(), JavaScript WebSocket() |
| 2.6 | NTP Time & Timestamps | Sync the ESP32 clock with NTP servers over the internet to generate accurate timestamps for logging. | Build: 'Scheduled Automation' β sync time on startup, log data with ISO timestamps, and schedule an LED at 08:00. | configTime(gmtOffset, dstOffset, ntpServer), getLocalTime(&timeinfo), strftime() |
| 2.7 | Over-the-Air (OTA) Updates | Update ESP32 firmware wirelessly over Wi-Fi without a USB cable using ArduinoOTA. | Build: OTA-Enabled Firmware β add OTA support to the Web Control Panel, and flash a code change wirelessly. | #include <ArduinoOTA.h>, ArduinoOTA.begin(), ArduinoOTA.handle(), network port upload |
| 2.8 | Module 2 Project: Connected Sensor Node | Combine Wi-Fi, MQTT, WebSockets, NTP, and OTA into a fully connected sensor node. | Project: 'IoT Sensor Node' β serves local WebSocket dashboard, publishes to MQTT, uses NTP timestamps, OTA enabled. | Full Module 2 β Wi-Fi, HTTP, MQTT, WebSockets, NTP, OTA |
Cloud Integration & Data Monitoring
Students integrate ESP32 with professional cloud platforms (ThingSpeak, Adafruit IO, InfluxDB/Grafana), compute edge aggregations, and harden IoT security.
| # | Lesson Title | What Students Learn | Activity / Project | Key Code / Platforms |
|---|---|---|---|---|
| 3.1 | Cloud IoT Platforms Overview | Survey ThingSpeak, Adafruit IO, and InfluxDB/Grafana. Understand REST APIs, API keys, and platform limits. | Platform Comparison: Create accounts on ThingSpeak/Adafruit IO, explore data retention, limits, and charting capabilities. | ThingSpeak, Adafruit IO, Blynk, API key, REST API, MQTT broker URL |
| 3.2 | Sending Data to ThingSpeak | Use ThingSpeak HTTP API to push multi-field sensor data. Visualize real-time charts automatically. | Build: 'ThingSpeak Temperature Logger' β read DHT22 and push temp/humidity to ThingSpeak every 20s. Export to CSV. | ThingSpeak.begin(), ThingSpeak.setField(1, val), ThingSpeak.writeFields(), API key |
| 3.3 | Adafruit IO Dashboard & MQTT | Connect ESP32 to Adafruit IO via MQTT. Publish feed data and subscribe to dashboard UI toggles. | Build: 'Adafruit IO Dashboard' β publish temp/humidity to gauges/charts. Subscribe to a toggle switch feed to actuate a relay. | Adafruit_MQTT, mqtt.subscribe(), mqtt.publish(), Adafruit IO feeds, dashboard |
| 3.4 | Cloud Alerts & Notifications | Configure cloud-side triggers to send email/mobile notifications when sensor data crosses thresholds. | Build: 'Smart Alert System' β ESP32 publishes an alert message when temp > 30Β°C. Adafruit IO/ThingSpeak triggers an email notification. | ThingSpeak React, Adafruit IO triggers, IFTTT webhook, alert threshold logic |
| 3.5 | Time-Series Data & InfluxDB + Grafana | Write data to InfluxDB via Line Protocol over HTTPS. Build professional Grafana dashboards. | Build: 'Professional IoT Dashboard' β ESP32 HTTP POSTs data to InfluxDB. Build Grafana panels with thresholds and Flux queries. | InfluxDB Line Protocol, HTTP POST to /api/v2/write, Grafana, Flux query language |
| 3.6 | Data Processing & Edge Computing | Compute data on-device (mean, min, max, std dev) before cloud upload to reduce latency and bandwidth. | Build: 'Smart Aggregator' β collect 10 readings, compute mean, reject outliers (>2Ο), and upload only the aggregated result. | Rolling average, min/max buffer, standard deviation, outlier rejection, edge vs cloud |
| 3.7 | Security in IoT Systems | Implement HTTPS/MQTTS (TLS). Securely manage credentials in config.h files. Set OTA passwords. | Security Audit: Refactor an insecure project: move credentials to config.h, use MQTTS, set OTA password, use .gitignore. | HTTPS (WiFiClientSecure), config.h, MQTTS (port 8883), OTA password, .gitignore |
| 3.8 | Module 3 Project: Remote Monitoring System | Build an edge-computing monitoring node that publishes securely to multiple cloud platforms with alerts. | Project: 'Remote Environmental Monitor' β aggregates edge data, publishes via MQTTS to ThingSpeak and Adafruit IO, fires alerts. | Full Module 3 β ThingSpeak, Adafruit IO, Grafana, MQTTS, edge computing, security |
IoT Project
Students design and implement a complete IoT system: multi-sensor data collection, FreeRTOS task architecture, MQTT/HTTP cloud communication, live dashboard visualisation, threshold alerts, secure credential management, and OTA updates.
| # | Lesson Title | What Students Learn | Activity / Project | Key Code / Platforms |
|---|---|---|---|---|
| 4.1 | IoT Project Briefing & Scoping | Define the scope of a complete IoT system: problem statement, functional requirements, and security metrics. | Project Scope Document: Write a user story, choose hardware, specify cloud platforms, and define functional/security requirements. | User story, functional/non-functional requirements, system scope, IoT architecture |
| 4.2 | System Architecture Design | Design data flow architectures, MQTT topic hierarchies, and hardware schematics. | Architecture Deliverable: Submit a system diagram, MQTT topic tree, data dictionary, and cloud setup plan for sign-off. | System architecture diagram, data flow, MQTT topic hierarchy, data dictionary |
| 4.3 | Hardware Build & Component Wiring | Assemble ESP32, sensors, and actuators. Test components individually before software integration. | Build Sprint: Complete breadboard assembly, run isolated test sketches, and photograph the hardware layout. | Component testing, circuit verification, breadboard-to-schematic documentation |
| 4.4 | Firmware Development β Connectivity Layer | Implement stable networking: auto-reconnecting Wi-Fi, persistent MQTT sessions, NTP sync, and OTA. | Build Sprint: Connectivity layer must handle forced network dropouts and automatically recover. Run for 15 minutes. | WiFi auto-reconnect, MQTT reconnect loop, configTime(), ArduinoOTA, config.h |
| 4.5 | Firmware Development β Sensor & Control Layer | Integrate FreeRTOS sensor tasks, edge aggregation, local threshold alerts, and actuator responses to MQTT. | Build Sprint: Sensors read to Core 0, MQTT actuates responses on Core 1. Use vTaskDelay() everywhere (no delay()). | FreeRTOS tasks, vTaskDelay(), MQTT command handling, EEPROM threshold storage |
| 4.6 | Cloud Dashboard & Alert Configuration | Build live dashboards using Adafruit IO/Grafana. Configure actionable email or push alerts. | Dashboard Build Sprint: Finalize gauges/charts, test threshold alerts via sensor warming, and test dashboard control toggles. | Adafruit IO dashboard, Grafana panels, ThingSpeak channels, alert triggers |
| 4.7 | System Testing, Security Hardening & Documentation | Conduct continuous integration tests. Perform security audits for TLS and credential isolation. | Testing & Hardening: 30-min continuous test, dropout recovery test. Write a 1-page setup guide and API/topic reference. | System testing checklist, security audit, config.h, MQTTS, system documentation |
| 4.8 | Final IoT Project Presentation | Deliver a live demonstration of the end-to-end IoT system, explaining FreeRTOS logic, cloud connectivity, and edge functionality. | Final Demo: 6-minute live presentation showing real-time dashboard updates and remote actuation, plus Q&A. | Full course β ESP32, FreeRTOS, MQTT, HTTP, cloud platforms, IoT security |
Teaching Notes & Tips
Pacing Guidance
Each module contains 8 lessons (~55β65 mins), totalling ~32 hours. FreeRTOS (1.5) and WebSockets (2.5) are conceptually challengingβplan for extra time and prepare worked examples. Checkpoints in Mod 4 are critical.
Differentiation
Advanced students can explore MQTT v5, LoRaWAN long-range networking, TinyML with TensorFlow Lite, or containerised Grafana on Raspberry Pi. Core students can use Wokwi for simulation without physical hardware.
Assessment Criteria
Final project assessed on: (1) Firmware (FreeRTOS, no delays). (2) Connectivity (auto-reconnect, OTA, TLS). (3) Cloud Integration (live dashboard, alerts). (4) Edge Aggregation. (5) Documentation.
Tools & Infrastructure
Hardware: ESP32 DevKit (38-pin), breadboards, DHT22, MPU6050 IMU, SD card module, OLEDs. Cloud (free tiers): ThingSpeak, Adafruit IO, HiveMQ Cloud, InfluxDB Cloud, Grafana. Software: Arduino IDE (ESP32 package), Wokwi.
IoT Project Tracks (Module 4)
Smart Home Automation (Adafruit IO schedules + relays), IoT Weather Station (ThingSpeak + email alerts), Smart Agriculture Monitor (soil moisture + irrigation relay), Smart Office (PIR/Air quality + multi-panel Grafana).
Prior Knowledge Expected
Students must be confident with Arduino C/C++ (functions, structs), digital/analog I/O, I2C, millis() non-blocking timing, and EEPROM. Completion of 'Arduino & Embedded Systems' (Intermediate) is highly recommended.
Advanced Arduino & IoT Systems Β· Advanced Β· Ages 16β18 Β· Β© Course Curriculum
Enroll Your Child Now