I need to create an app to connect to the micorbit to recive and send data. When I set any of the microbit extensions to Bluetooth LE1, the app crashes when I run it. When I set it to unspecified, it says there is error 1 and that the temperature sensor is undefined. How do I fix this.
Show us the version of the BLE extension.
The stock firmware should have many of the BLE services enabled. However, if you've loaded a custom build from the MakeCode editor then you will need to manually turn on the relevant services in your code. You may want to take a look at Part 1 of our most recent IOT unit, which goes through the process of using the micro:bit UART service to communicate back and forth with the mobile device.
You can of course use anything you want, but personally I am only using MicroBlocks to program any microcontroller including the micro:bit, ESP32 family, etc.
There is a special App Inventor extension that makes it really easy to talk between MicroBlocks and App Inventor. I already made several apps this way.
Its bluetooth LE1
Thank you, I'll try that
To show the version, you need to locate the BluetoothLE component under the Extensions category and click on the ? icon. It will tell you the version number there. The latest version is 20240822, so if you don't have that then you will want to upgrade.
(added to FAQ)
The MicroBlocks extension makes it possible to connect to a lot of micro controllers, not just the micro:bit.
At the moment we are working with a number of members from the App Inventor team, because using the MicroBlocks extension is much easier then using the BLE extension.