"Robot" Extensions...discovery

I had an idea when confronted with a failure to compile in MakeCode for Micro:bit and the Yahboom Micro:bot. Being a complete Noob and not knowing how compilers work I wondered why the Bluetooth app.code for the bot had to be pasted as a .hex file into the Microbit drive and may not be opened in MakeCode…or else it will not compile, save or share nor will it then download to Micro:bit. What use is that? It occurred to me that maybe the compiler does not speak Chinese ! So I got rid of all the Chinese character blocks in the program and now it does compile ! That means that the program below is missing a lot of function groups of blocks but some remain. Does it work? Stay tuned…I would not bet on it…but maybe. https://makecode.microbit.org/_52hXc7AAhDvc

2 Likes

I thought make code fully supports any language.

1 Like

I need some help on this. Do you think Jason could look at it? This does now compile , above share code link. It does now download. Jason discovered that you can’t open the original file below; but have to drag and drop it directly. So the code connects to Microbit via bluetooth and my Samsung phone, J7. But, when I click on any icon on the phone screen, it disconnects. It will re-pair quickly but not issue a command, only disconnect, so I think there is some simple error that I caused when deleting the Chinese blocks. It should be obvious where that is to a coder with experience in MC. Any ideas? Here’s the original .hex file. If you open it in MC and it does compile, please tell me. It does not compile for me. My alteration of it is in my first post above: https://drive.google.com/open?id=1c3uKHq2a_sDettoHP8FH1CZ4SkDBRSGI

Now i find that when I leave some Chinese blocks in the code but remove others in English in MC it does compile so there must be some block that is tripping up the compiler.

So there are 2 Forever functions in the google drive link posted above. One of them causes the compiler error. Getting rid of that the program will compile and download. But then it throws the frowny face 020 error on the Micro:bit LED display and does not run. That’s all I know up to this point.

1 Like

We can wait and see what Jason thinks

1 Like

It’s not a failure to read Chinese. Some ‘function’ blocks in Chinese do compile. The fault seems to lie in one “forever” loop. Maybe it is not a fault from point of view of manufacturer but without that series of “If , then” in that forever loop, the program will compile but the bot will not run using bluetooth from my Samsung phone. All I’m trying to do is alter variables like wheel speed in the program but any changes with that forever loop still in the program will not compile, even no changes, if the .hex is opened in MakeCode, it will not compile. I have removed in succession, each block in the offending forever but even then it will not compile so there may be more than one set of blocks that breaks compiling. I have tried adding other Yahboom extensions but some object to Neopixel or RGB code so that may be a hint. Any help with making this blueooth control of Yahboom bot usable in MakeCode so that it will download to Microbit would be appreciated.

1 Like

Not sure about that but I know @JasonLS is making us clean extensions for everything so we do not have to worry about those issues.

1 Like