Skip to content

Instantly share code, notes, and snippets.

@ahryshan
ahryshan / morse_buzzer.py
Created January 21, 2023 15:37
Python Raspberry morse buzzer
from gpiozero import Buzzer
from time import sleep
long_sleep: float = 0.25
short_long_ratio: float = 1/3
short_sleep: float = long_sleep * short_long_ratio
def long(b: Buzzer):
b.on()
sleep(long_sleep)
---
BasedOnStyle: LLVM
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Left
AlignConsecutiveAssignments:
Enabled: true
AcrossComments: true
AlignCompound: true
AlignConsecutiveBitFields:
Enabled: true