IOT103 · Microcontrollers: Arduino and ESP32
About Course
Program Arduino and ESP32 microcontrollers in C++ with the Arduino framework: digital and analog I/O, PWM, timing without blocking, serial debugging and Wi-Fi, all in the free Wokwi simulator.
Who it is for
Learners who understand basic circuits and want to write firmware that reads inputs, controls outputs and connects to a network.
Prerequisites
IOT102 or equivalent knowledge of LEDs, resistors, buttons and Ohm's law.
What you will be able to do
- Compare Arduino Uno and ESP32 boards and choose one for a given project.
- Write Arduino-framework sketches that use digital I/O, analog input, PWM and the serial monitor.
- Replace blocking delay() calls with millis()-based timing to run several tasks at once.
- Connect a simulated ESP32 to Wi-Fi and report its status reliably, including reconnection.
Lessons
- Lesson 1 · Inside a microcontroller: Arduino and ESP32
- Lesson 2 · The Arduino programming model
- Lesson 3 · Non-blocking code and ESP32 connectivity
- Lesson 4 · Lab and assignment
Lab: A non-blocking order-ready signal with Wi-Fi status
You program a simulated ESP32 for a coffee counter: a button marks an order as ready, an LED blinks without blocking, a buzzer beeps once and a potentiometer sets LED brightness through PWM. The board connects to the simulator's Wi-Fi network and prints its connection state.
Free tools: Wokwi ESP32 simulator (free); optional Arduino IDE 2 or VS Code with PlatformIO
Assessed assignment
Submit your Wokwi project link and the complete sketch, organized into small functions (for example readButton, updateLed, checkWifi). Include a short table that lists each pin, its mode and its purpose. Explain why your loop never blocks and show serial-monitor evidence of the button, PWM and Wi-Fi reconnection logic working. Close with one paragraph on whether you would use an Arduino Uno or an ESP32 for this product and why.
| Criterion | Weight | What excellent work looks like |
|---|---|---|
| Functionality | 35% | Button, blinking LED, buzzer, PWM brightness and Wi-Fi status all work as specified in the simulator. |
| Non-blocking design | 25% | No delay() in the main loop; timing uses millis() and the button responds instantly. |
| Code quality | 25% | Code is split into named functions, uses constants for pins and has helpful comments and logs. |
| Board choice reasoning | 15% | The Uno versus ESP32 decision is justified with concrete factors such as connectivity, voltage, memory and cost. |
Portfolio piece
A clean, commented ESP32 firmware template with non-blocking timing and Wi-Fi reconnection that you can reuse in later projects.
Next step
Continue with IOT104 · Sensors, Actuators and Data Collection · 6 hours · $42.00
Course Content
IOT103 · Microcontrollers: Arduino and ESP32 (6 h)
-
Lesson 1 · Inside a microcontroller: Arduino and ESP32
-
Lesson 2 · The Arduino programming model
-
Lesson 3 · Non-blocking code and ESP32 connectivity
-
Lesson 4 · Lab and assignment
-
IOT103 Assessment · Microcontrollers: Arduino and ESP32
