Embedded systems and IoT
A hands-on microcontroller course at Arduino, ESP32 and STM32 level: pins and pull-ups, interrupts, timers and PWM, ADCs and sensors, UART, I2C and SPI drivers, registers and the memory map, FreeRTOS tasks, low power, watchdogs, and connecting to the internet with Wi-Fi and MQTT. It ends with a battery sensor node you could build. Every lesson is a board you can step through, then a short quiz. Assembly language is out of scope: we stay in C and C++.
Getting started with a microcontroller
Choosing a board and getting your code onto it. The Hardware lesson on microcontrollers explains what is inside the chip, so this module stays on boards, toolchains and your first firmware; the C++ basics lessons cover the language used here.
-
الدرس 01 · المدة: 10 د
Where embedded systems live and what limits them
الخطوات: 10لم يبدأ -
الدرس 02 · المدة: 12 د
A tour of Arduino, ESP32 and STM32 boards
الخطوات: 10لم يبدأ -
الدرس 03 · المدة: 12 د
From code to chip: compile, link and flash
الخطوات: 10لم يبدأ -
الدرس 04 · المدة: 10 د
setup() and loop(): the superloop
الخطوات: 10لم يبدأ -
الدرس 05 · المدة: 10 د
Blink: your first firmware
الخطوات: 10لم يبدأ -
الدرس 06 · المدة: 12 د
Debugging with serial print
الخطوات: 10لم يبدأ
Digital pins: inputs and outputs
Driving LEDs and reading buttons safely. Uses voltage dividers from the Circuits course and the Hardware lesson on transistors.
-
الدرس 07 · المدة: 10 د
Digital output: driving an LED
الخطوات: 7لم يبدأ -
الدرس 08 · المدة: 12 د
Pin current limits and driving loads with a transistor
الخطوات: 9لم يبدأ -
الدرس 09 · المدة: 10 د
Digital input and logic levels
الخطوات: 8لم يبدأ -
الدرس 10 · المدة: 12 د
Pull-up and pull-down resistors
الخطوات: 9لم يبدأ -
الدرس 11 · المدة: 10 د
Debouncing a button
الخطوات: 9لم يبدأ -
الدرس 12 · المدة: 12 د
3.3 V and 5 V: level shifting
الخطوات: 10لم يبدأ
Interrupts, timers and PWM
Reacting fast, keeping time without blocking, and structuring firmware as a state machine. The Hardware lesson on interrupts and I/O explains why polling wastes time and the Hardware lesson on state machines covers Moore and Mealy machines; the Circuits lesson on RC circuits explains PWM smoothing. Here you write the firmware.
-
الدرس 13 · المدة: 12 د
Interrupts in firmware: attachInterrupt, edges and latency
الخطوات: 10لم يبدأ -
الدرس 14 · المدة: 12 د
volatile and sharing data with an ISR
الخطوات: 9لم يبدأ -
الدرس 15 · المدة: 12 د
Hardware timers, prescalers and millis()
الخطوات: 9لم يبدأ -
الدرس 16 · المدة: 12 د
PWM: dimming an LED
الخطوات: 10لم يبدأ -
الدرس 17 · المدة: 14 د
Driving a servo and a one-way DC motor with a MOSFET
الخطوات: 11لم يبدأ -
الدرس 18 · المدة: 12 د
Non-blocking code: replacing delay()
الخطوات: 9لم يبدأ -
الدرس 19 · المدة: 12 د
Event-driven firmware as a state machine
الخطوات: 10لم يبدأ
Analog: ADC, DAC and sensors
Turning the physical world into numbers and back. The Signals lessons on quantization, ADCs and DAC reconstruction explain the converters inside, and the Signals lessons on moving averages and IIR filters explain the smoothing used here; the Circuits op-amp lesson covers signal conditioning.
-
الدرس 20 · المدة: 12 د
Reading an analog pin
الخطوات: 9لم يبدأ -
الدرس 21 · المدة: 12 د
Reference voltage, resolution and scaling
الخطوات: 9لم يبدأ -
الدرس 22 · المدة: 14 د
Sensors: potentiometer, thermistor and light
الخطوات: 9لم يبدأ -
الدرس 23 · المدة: 12 د
Smoothing noisy readings
الخطوات: 8لم يبدأ -
الدرس 24 · المدة: 12 د
Making a voltage: DAC and filtered PWM
الخطوات: 9لم يبدأ -
الدرس 25 · المدة: 12 د
Calibrating a sensor
الخطوات: 8لم يبدأ
UART, I2C and SPI in firmware
Talking to other chips from your code. The Hardware lesson on serial buses explains the wires and the Hardware lesson on test and debug shows what a logic analyser is; here you write the drivers and use the analyser to find bugs in them. The UART ring buffer is the one from the DSA lesson on queues and ring buffers.
-
الدرس 26 · المدة: 14 د
UART in firmware: baud rate and ring buffers
الخطوات: 10لم يبدأ -
الدرس 27 · المدة: 14 د
I2C in firmware: addresses, registers and ACKs
الخطوات: 10لم يبدأ -
الدرس 28 · المدة: 14 د
SPI in firmware: modes and chip select
الخطوات: 10لم يبدأ -
الدرس 29 · المدة: 14 د
Debugging your driver with a logic analyser: triggers, NACKs and glitches
الخطوات: 10لم يبدأ -
الدرس 30 · المدة: 14 د
Writing a sensor driver from a datasheet
الخطوات: 10لم يبدأ
Registers and the memory map
What digitalWrite() really does, ending with setting up DMA by hand. Builds on the C++ lessons on pointers, the Hardware lessons on registers and ROM and flash, and the OS lesson on polling, interrupts and DMA.
-
الدرس 31 · المدة: 12 د
The memory map: flash, RAM and peripherals
الخطوات: 10لم يبدأ -
الدرس 32 · المدة: 12 د
Peripheral registers and bit masks
الخطوات: 9لم يبدأ -
الدرس 33 · المدة: 12 د
Blink with registers, no library
الخطوات: 10لم يبدأ -
الدرس 34 · المدة: 14 د
Reset, the vector table and startup code
الخطوات: 8لم يبدأ -
الدرس 35 · المدة: 12 د
Living in 2 KB of RAM: stack, heap and globals
الخطوات: 10لم يبدأ -
الدرس 36 · المدة: 12 د
Configuring DMA: moving data without the CPU
الخطوات: 10لم يبدأ
Bare metal versus an RTOS
Running many jobs at once with FreeRTOS. The general theory lives in the OS course: semaphores, locks, the producer-consumer problem, deadlock, scheduling and real-time scheduling with deadlines and worst-case execution time. The C++ lesson on threads and atomics covers the language side. Here you use the FreeRTOS API: ticks, xQueueSend and semaphores given from an ISR.
-
الدرس 37 · المدة: 12 د
When the superloop is not enough
الخطوات: 10لم يبدأ -
الدرس 38 · المدة: 14 د
FreeRTOS tasks and priorities
الخطوات: 9لم يبدأ -
الدرس 39 · المدة: 14 د
The FreeRTOS tick and how it picks a task
الخطوات: 11لم يبدأ -
الدرس 40 · المدة: 14 د
FreeRTOS queues: xQueueSend from tasks and ISRs
الخطوات: 8لم يبدأ -
الدرس 41 · المدة: 14 د
FreeRTOS mutexes and waking a task from an ISR
الخطوات: 10لم يبدأ -
الدرس 42 · المدة: 14 د
Priority inversion and priority inheritance
الخطوات: 11لم يبدأ
Low power and reliability
Running for months on a battery and recovering from faults. Builds on the Hardware lessons on power supplies and batteries.
-
الدرس 43 · المدة: 14 د
Power budgets and battery life
الخطوات: 11لم يبدأ -
الدرس 44 · المدة: 14 د
Sleep modes and wake-up sources
الخطوات: 9لم يبدأ -
الدرس 45 · المدة: 12 د
Watchdog timers
الخطوات: 9لم يبدأ -
الدرس 46 · المدة: 14 د
Brown-out, resets and fault handling
الخطوات: 10لم يبدأ -
الدرس 47 · المدة: 14 د
Saving data in EEPROM and flash
الخطوات: 8لم يبدأ
Connectivity and the capstone node
Putting your device on the network. The Networking lessons on Wi-Fi, Bluetooth, Zigbee and IoT with MQTT explain the protocols; here you use them from an ESP32.
-
الدرس 48 · المدة: 14 د
Joining Wi-Fi from an ESP32
الخطوات: 10لم يبدأ -
الدرس 49 · المدة: 12 د
Publishing sensor data with MQTT
الخطوات: 10لم يبدأ -
الدرس 50 · المدة: 14 د
A BLE sensor: services and characteristics
الخطوات: 10لم يبدأ -
الدرس 51 · المدة: 14 د
Over-the-air updates and rollback
الخطوات: 10لم يبدأ -
الدرس 52 · المدة: 14 د
Securing a device: TLS, secrets and secure boot
الخطوات: 11لم يبدأ -
الدرس 53 · المدة: 15 د
Capstone: a battery sensor node
الخطوات: 9لم يبدأ
Special topics
Stand-alone deep dives. Take them any time after the module they build on. GDB debugging assumes the Hardware lesson on test and debug (what SWD and JTAG are); motor control links the Control lesson on DC motor speed for closed-loop speed; testing on your laptop uses the Software lesson on unit testing and the Python lesson on pytest.
-
الدرس S1 · المدة: 14 د
Firmware debugging with GDB: watchpoints, hard faults and ISRs
يعتمد على Registers and the memory map
الخطوات: 10لم يبدأ -
الدرس S2 · المدة: 14 د
Character LCD and OLED displays
يعتمد على UART, I2C and SPI in firmware
الخطوات: 11لم يبدأ -
الدرس S3 · المدة: 12 د
MicroPython on the ESP32
يعتمد على Getting started with a microcontroller
الخطوات: 10لم يبدأ -
الدرس S4 · المدة: 14 د
H-bridges, motor direction and stepper motors
يعتمد على Interrupts, timers and PWM
الخطوات: 11لم يبدأ -
الدرس S5 · المدة: 12 د
Testing firmware on your laptop
يعتمد على Bare metal versus an RTOS
الخطوات: 10لم يبدأ