๐ ๏ธ Section project: the doorbell
Section 3: Control: the switch and the buttonLesson 3.5 ยท โฑ 12 min
๐ฏ Project goal
When you press the button, the buzzer rings and the LED lights up together, and when you let go they both stop.
Think first
One button controls two parts. The buzzer needs a path, and the LED and its resistor need a path. Make both paths start after the button.
๐ Another example: a bell with a light
The door button runs the buzzer and lights an LED with it, for someone who can't hear the bell.

โ๏ธ Practise
Build the doorbell in the challenge. If you need help, click ๐ก Help me.
โ๏ธ Practise here in the lessonโ Close the labor open the lab in a new page โ
โ๏ธ Practise
Extra challenge: add a main switch before the button: if it is open, the bell never works.
โ๏ธ Practise here in the lessonโ Close the labor open the lab in a new page โ
๐ฏ Challenge yourself
Easy
A doorbell with one button.
๐ Show the solution๐ Hide the solution

Result: it rings while you press.
Medium
Add a main switch: the bell works only when the switch is ON.
๐ Show the solution๐ Hide the solution

Result: the switch is ON and the button pressed: it rings.
Hard
Two doors and one bell: two buttons, each on a path, then the buzzer.
๐ Show the solution๐ Hide the solution

Result: either door rings the same bell.

