Bluetooth over Core2
-
Hello friends of the M5Stack.
Who has Bluetooth over UIFlow running in the Core2.
I need it to scan Bluetooth sensors.
Does anyone have a sample code for me? -
Doesn't anyone have a simple BLE example where I can just scan the ad data from Bluetooth?
-
Official MicroPython examples may help you.
https://github.com/micropython/micropython/blob/master/examples/bluetooth/ble_temperature_central.py
Need to change a littlefrom ble_advertising import decode_services, decode_name
->from ble.ble_advertising import decode_services, decode_nameand if you run from UIFlow,
__name__is not"__main__"but"flow.m5cloud"
removeif __name__ == "__main__":and just calldemo()if event == _IRQ_SCAN_RESULT:is where receive advertisement dataAnother thing to note is the current UIFlow (v1.7.1) MicroPython cannot perform active scan. On some devices, the advertisement data does not contain the required data (name, etc.) but is included in the scan data which require active scan.
-
Thank You
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login