Commit f1691a31 authored by plaasio's avatar plaasio 👷🏽

Update btns.py

parent 2c7613ff
import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library
import asyncio
print("pressing")
async def mon(x)
return "hi"
try:
async def speak_async():
GPIO.setwarnings(False) # Ignore warning for now
await def("1")
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
......@@ -27,5 +23,9 @@ try:
if GPIO.input(18) == GPIO.HIGH:
print("yes")
break
finally:
GPIO.cleanup()
loop = asyncio.get_event_loop()
loop.run_until_complete(speak_async())
GPIO.cleanup()
loop.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment