Lesson 01 LED
Lesson 02 Button
Lesson 03 Button Controlled Camera
Lesson 04 Music box and Reaction game
Lesson 05 Servo
Lesson 06 Distance Sensor
Lesson 07 Keypad Using Switches
Lesson 08 Buzzer
Lesson 09 Controlling Robot
Lesson 10 CPU and Internet
Lesson 11 Firebase
Button can be used to control the circuits
from gpiozero import Button
Now Button is available directly in your script:
button = Button(2)
Check if a
Button
Please follow the Wiring Diagram:
from gpiozero import Button button = Button(2) while True: if button.is_pressed: print("Button is pressed") else: print("Button is not pressed")
Please check the video below: