Created
June 17, 2021 05:21
-
-
Save ochilab/bd294205f4f7a257b190ddbed519d70f to your computer and use it in GitHub Desktop.
bleakライブラリでBLE端末を発見する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from bleak import discover | |
import time | |
async def run(): | |
while True: | |
devices = await discover() | |
for d in devices: | |
print(d.address,d.metadata,d.name,d.rssi) | |
loop = asyncio.get_event_loop() | |
loop.run_until_complete(run3()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment