Generation

generate functionTue, 01 Aug 2023

Crea una conexión Bluetooth de la ESP 32 a un teléfono

def conectBT(mac, name): bluetooth = Bluetooth() bluetooth.start_scan(-1) while bluetooth.isscanning(): adv = bluetooth.get_adv() if mac in adv.mac and name in adv.name: bluetooth.connect(mac) while not bluetooth.connected(): pass bluetooth.stop_scan() return True

Questions about programming?Chat with your personal AI assistant