Connecting BBC microbit V2 to Mit App Inventor

6 posts were split to a new topic: MicroBlocks and App Inventor


Thanks for the support so far. I used another phone it requested I clear the cache after doing that it worked after crashing once. And later started crashing again and I got the error message attached.

I removed your phone number a second time. Please don't post personal info on the community.

Start reading here Get Started - MicroBlocks

For the time being I stop posting in this thread, to avoid confusion.

Why? I can always try the two. I really want to make this work.

I think it will be too confusing to try 2 things if you are beginner at both.
You can continue with the "old" version, basically the .aia and the adapted .hex; and as I told you it basicially works fine. You could now add the io-stuff on the microbit again and see if that works for you. If there is a problem, you have to be very explicit about the error you are experiencing and any error messages you see. Because we cannot guess what is wrong without any information.

At some time later I will look at Peter's stuff but not immediately.

It is also important to note here that the Android BLE stack will memoize the available services for a given BLE peripheral. This can lead to possible issues in App Inventor because currently we do not force a refresh of the services on every connect. This can cause problems if you change your micro:bit code to use different services from the set that was enabled on the first connection.

I'm not a beginner at both, is only microblock that I just started using. And is not just me working on the project. We have just few days to wrap up.I have attached a video of what happens.

And please i don't mind working on the two platforms. Thanks.

It is using the same service

Hello, I'm still unable to solve this problem

Sorry, I lost track of what you are trying to do and whether you want to continue with the microblocks from Peter. If you just want to stay with makecode and .hex files, please attach your latest .aia and .hex
(btw. there was a problem with the BLE extension and the latest Java release, a temporary fix is here: Crash with BluetoothLE and micro:bit on Android 14 - #7 by extremerotary

We are not going with the microblock.

Then, attach your latest .aia and .hex so that I can take a look.


Hey, I see that this help page has solved many peoples issues, but there is a problem that I have that may or may not have been raised. So I am trying to make a app that will connect to a Micro:Bit (I have already gotten that part done) and then receive messages from that same Micro:Bit (I only need it to receive from the Micro:bit the device that it connects to doesn't need to send anything) and then the connected device needs to display the message sent from the Micro:Bit. The last two steps are the ones that are confusing me as I don't believe the app is receiving the message even though I know that the Micro:Bit is sending them. While doing this I downloaded the microbit extension but instead of one of the options being called Micro:Bit_UART1 it was called Micro:Bit_UART_Simple1 this confused me as I wasn't sure if it was the same and while doing some research on tutorials and other peoples code I saw this one thing with a block called:
When.Micro:Bit_UART1.TXCharacteristicRecived
I think a variation of this block would be super useful for my code, but it isn't showing up on the Micro:Bit_UART_Simple blocks options. If you have a solution for this it would be deeply appreciated and I understand that this post has been up for a while and I am quite late to ask for help but if anyone knows anything from a new option for my code or a better Micro:Bit extension it would be super helpful as I am super new to this program and could use some help, as well as this my project is kind of on a deadline.
microbit-20241120-quickchat---Trying-to-get-BT-working---Copy (1).hex (1.3 MB)

Some of the other images



Hi,
There is no way I can see what is wrong with your communication issues if I do not have the AppInventor side of the communication, therefore:
To export an aia from your Project to your computer

Choose File | Export Project to export the source code (blocks) for your project. The source code is downloaded in an .aia file.

Then, upload that .aia here.

Ok, I'm so sorry i didn't realize! Here is the Exported Verstion
QuickChatTest.aia (307.6 KB)

What are you trying to do? Connecting to a micro:bit as if it were an ESPxx??
That cannot work. If you really want to learn how to connect to a micro:bit, do this tutorial: The Internet of Things: Data Acquisition and Analysis
Try the easy communication as exaplained in this tutorial, then look at your .aia again, and realize that it cannot work. There is no easy way for me to repair it.
I was wondering about your .hex file too. You are never sending anything to your app, except for the first test message, how is it supposed to work?

I am trying to get the Device to pick up the message sent from the Micro:Bit as even though the Micro:Bit is sending the message I don't understand how to make my app receive that same message. The Micro:Bit is connecting to the Bluetooth.

That is what I am trying to tell you: your app inventor app is not capable to receive micro:bit messages. Do the tutorial I pointed you to!! It contains an example that exactly does what you want.