rpi_zero_neopixel_buzzer/detect_buzz.py

9 lines
216 B
Python
Raw Normal View History

2024-03-24 22:27:13 +01:00
#!/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!")