Skip to content
Snippets Groups Projects
Commit dda0fd94 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Change buzz shit

parent e1195df7
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,7 @@ verify_cert = true
LEDS = neopixel_spi.NeoPixel_SPI(board.SPI(), 10)
buzzer_pin = 12
GPIO.setmode(GPIO.BOARD)
buzzer_pin = 18
GPIO.setup(buzzer_pin, GPIO.OUT)
# from input-event-codes.h
......@@ -152,20 +151,19 @@ def set_led(ledstate, config):
def set_buzzer(ledstate, config):
global buzzer_pin
buzzer = GPIO.PWM(buzzer_pin, 1000) # Set frequency to 1 Khz
buzzer.start(10) # Set dutycycle to 10
time.sleep(0.5)
buzzer = GPIO.PWM(buzzer_pin, 2000) # Set frequency to 1 Khz
f = 220
buzzer = GPIO.PWM(buzzer_pin, f) # Set frequency to 1 Khz
buzzer.start(50) # Set dutycycle to 10
time.sleep(0.5)
buzzer = GPIO.PWM(buzzer_pin, 1000) # Set frequency to 1 Khz
buzzer.start(10) # Set dutycycle to 10
buzzer.stop()
time.sleep(0.5)
buzzer = GPIO.PWM(buzzer_pin, 2000) # Set frequency to 1 Khz
buzzer.start(50) # Set dutycycle to 10
for i in range(10):
buzzer.ChangeFrequency(i*f) # Set frequency to 1 Khz
buzzer.ChangeDutyCycle(50) # Set dutycycle to 10
time.sleep(0.5)
buzzer.stop()
def process_request(output_queue, config=None, logger=None):
"""
Process a event from the output queue.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment