Lab Two 🍁

LEDs and Push Buttons II

Linyun Liu





Project 1

Design and construct a circuit that includes an LED bar graph and two push buttons (of course, you also need resistors). When one push button is pressed, the LED light is gradually lighting up and out from left to right (1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 1 -> 2 ......) whereas when the other button is pressed, the LED light is gradually lighting up and out from right to left similar to the tutorial project 4-2 (you need to use PWM). Capture your settings and working circuit in photos and videos.

• LIST OF HARDWARE:

LED Bar x1, 220Ω x8, 10kΩ x1, ESP32, Jumpers, button x2

• CIRCUIT DIAGRAM:

• BREADBOARD VIEW:

• PHOTO OF SETTING ON THE BREADBOARD:

• VIDEO:

• SOURCE CODE:

View Download





Project 2

Design and construct a circuit that includes a push button, an RGB LED, and NeoPixels (8 RGB LED module) (and registers). When the button is pressed, the RGB LED is lit with a specific colour followed by the NeoPixels lit with the same colour. Each pressing the button changes the colour from red to orange to yellow to green to blue to indigo to violet to red to orange to ... (repeating the rainbow colours). Capture your settings and working circuit in photos and videos.

• LIST OF HARDWARE:

RGB LED x1, 10kΩx2, ESP32, Jumpers, Buttons x1, Neopixel LED x1

• CIRCUIT DIAGRAM:

• BREADBOARD VIEW:

• PHOTO OF SETTING ON THE BREADBOARD:

• VIDEO:

• SOURCE CODE:

View Download