Example #1
0
async def purr(repeat: int = 2):
    for i in range(repeat):
        ser.write(str.encode(Sound.LOW_SLOW.value))
        await asyncio.sleep(0.2)
        ser.write(str.encode(Sound.HIGH_SLOW.value))
        await asyncio.sleep(0.2)
        ser.write(str.encode(Sound.LOW_SLOW.value))
        await asyncio.sleep(0.5)
Example #2
0
async def manual_noise_for_(sound: str):
    ser.write(str.encode(sound))
Example #3
0
async def low_beep():
    ser.write(str.encode(Sound.LOW_SLOW.value))
    ser.write(str.encode(Sound.LOW_SLOW.value))
Example #4
0
async def peep(repeat: int = 3):
    for i in range(repeat):
        ser.write(str.encode(Sound.HIGH_FAST.value))
        ser.write(str.encode(Sound.HIGH_FAST.value))
        ser.write(str.encode(Sound.HIGH_FAST.value))
Example #5
0
async def chirp():
    ser.write(str.encode(Sound.HIGH_FAST.value))
    ser.write(str.encode(Sound.LOW_FAST.value))
    ser.write(str.encode(Sound.HIGH_SLOW.value))