How do you use App inventor blocks for micro:bit IO pin configuration?

Dear all.

I got a page of these App inventor configure micro:bit IO pin. But I cannot find any example on syntax. Would anyone help by advising where I can read these of some coding examples?

Wilson Yuen

can you share the page it is most probably a extension

Hello Wilson,

Here is some example recourses to start with

http://iot.appinventor.mit.edu.ezproxy.canberra.edu.au/assets/howtos/MIT_App_Inventor_Microbit_LED.pdf
http://iot.appinventor.mit.edu.ezproxy.canberra.edu.au/assets/howtos/MIT_App_Inventor_Microbit_IOpin_RGBLED.pdf

Hello Rnareshu.

Thanks for your kind response but your link is about an outdated pinIO extension which is not the latest. I try the old one but fail.

Do you have the latest one?.

Wilson Yuen

Yes, it seems to be outdated, as I am not able to download the .aix from the link provided.

http://iot.appinventor.mit.edu.ezproxy.canberra.edu.au/assets/resources/SimpleMicrobit.aix returning 404.

and the extension provided in

is also not according to the reference document.

You can also search/study #microbit for some already reported issues/solutions to get some basic ideas and FAQ Section: BlueTooth/BLE and Micro:bit

1 Like

I look into the FAQ and all related topics but there is even no basic things regarding how to use these function blocks. The simplest question is what is the data format to be put.

Would anyone help me on this?

Thanks in advance.

Regards,

Wilson Yuen

Hello Wilson

I'm not sure if the micro:bit extension can still be used with the latest App Inventor version - not only that, but the 'old' extension worked better than the 'current' extension. Also, a lot depends on the micro:bit you are using. The original v1 or the latest v2?

What I can say is that MIT are working on a new extension and it should work with both V1 and V2 (and take out the original bugs).

The extension is intended to make things easy, but you could use the App Inventor BLE extension to communicate with your micro:bit.

I have some useful links on my website:
https://www.professorcad.co.uk/appinventortips#TipsMicroBit

If you search the Help forum, you will find a lot of useful guidance by @Ghica

1 Like

Thanks ChrisWard. I will read through @Ghica posts.

I am using v1 in normal case. I am surprised why no example of such data format of command block was provided somewhere.

Hi Wilson,
It has been a while since I last tried working with the micro:bit, but as far as I know not much has changed.
If you just want to display a smiley or something like that, the newest (well, already quite old I think) micro:bit extension, should be fine, but if you want to have a meaningful communication with a micro:bit, you need UART, and that is only available through the old extension.
See here to find the links:

The micro:bit v2 is much nicer with UART because it has more memory.
I think the best way to handle a mcro:bit is to write code for the micro:bit itself, that receives commands via UART and then does something with these commands. My example is driving a little robot. There is also an example of controlling a robot arm.
And, better than using the extension for the micro:bit, use the general BLE extension, if you know the right UUID's. But you still have the problem of finding the right data formats.

3 Likes