S&B Volcano vaporizer remote control with Pi Pico W
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

scan.py 368B

12345678910111213141516
  1. #!/usr/bin/env python
  2. import asyncio
  3. from bleak import BleakScanner
  4. async def scan():
  5. print("scanning for 5 seconds, please wait...")
  6. devices = await BleakScanner.discover(return_adv=True)
  7. for d, a in devices.values():
  8. print()
  9. print(d)
  10. print("-" * len(str(d)))
  11. print(a)
  12. if __name__ == "__main__":
  13. asyncio.run(scan())