Learning Objectives
Learn how to combine multiple components with the ESP32.
Understand how to connect and program an I2C LCD, LED, and buzzer.
Simulate a project that integrates visual, sound, and display outputs.
Components Needed
1 × ESP32 board
1 × LED
1 × 220Ω resistor
1 × Active buzzer
1 × I2C LCD (16x2)
Steps in Wokwi
Go to https://wokwi.com.
Click Start a new project and select ESP32 as your board.
From the Add Part (+) menu, add an LED, resistor, buzzer, and I2C LCD (16x2).
Wire the components:
LED: GPIO 14 → Resistor → LED anode (+); LED cathode (–) → GND.
Buzzer: GPIO 27 → Buzzer +; Buzzer – → GND.
LCD (I2C): VCC → 5V, GND → GND, SDA → GPIO 21, SCL → GPIO 22.
Running the Simulation
Click ▶ Play in Wokwi.
The LCD will display messages.
The LED will blink and the buzzer will sound in sync.
Key Takeaways
How to use I2C communication for LCDs.
Safe wiring of an LED with a resistor.
Controlling multiple outputs (LED, buzzer, LCD) with one ESP32 board.
How hardware and software work together in IoT projects.
Comments
Post a Comment