detect buzzer is pressed

This commit is contained in:
L3D 2024-03-24 22:27:13 +01:00
parent d2d4de1fba
commit ebde2bb06a
No known key found for this signature in database
GPG key ID: AD65B920933B4B20
2 changed files with 9 additions and 0 deletions

8
detect_buzz.py Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# See https://gpiozero.readthedocs.io/en/stable/api_input.html
from gpiozero import Button
buzzer = Button(16)
button.wait_for_press()
print("The button was pressed!")

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
gpiozero