我得到了下面的代码:Python的蓝牙没有返回值(树莓PI)
import bluetooth
def apparaat():
nearby_devices = bluetooth.discover_devices(lookup_names = True, flush_cache = True, duration = 15)
for address in nearby_devices:
print("Gevonden apparaten: " + str(address))
print("Gevonden apparaten: " + str(nearby_devices))
apparaat()
当我运行该脚本的出来说就是:
Gevonden apparaten: []
当我扫描我的覆盆子蓝牙设备PI会返回一对夫妇。什么我在这里失踪?
是否安装PI-蓝牙? sudo apt-get install pi-bluetooth – Lazykiddy
是的,我做了:(!(感谢您的帮助) – joey
当你的蓝牙设备返回时,你如何扫描蓝牙设备? – Lazykiddy