mBlock 5 - Self Balance Program



I am a classroom teacher who teaches in an environment where students all have their own personal laptops, both Windows and Mac. Due to this, I have to use USB connectivity and upload mode.

I am trying to adapt the following guide to work with my situation.

I cannot find the Firmware/default program for the self-balancing robot anywhere in the online IDE for mBlock 5.

Where can I find this code?

Thank you.


I have made a program that is stabilizing the nervous bird. It can also be set to move the bird around and avoid walls etc. Do you want the code ?


Yes please!


Do you want whole code or just a code that keep the balance ?
I can make a parameter that can just keep balance if you want.
The move around code is not perfect yet. A bit sensitive to battery level.
Another thing: I just have c-code version. Hope its ok for you.
You can paste the code into mBlock c-code section also and upload from there,
I use a arduino-plugin in Visual Studio. Very good for debugging. Have you tried it ?
The code also compile in the Arduino editor if you have installed the drivers correctly.


Just balance is okay. Thank you!


OK, I will prepare program tonight and send you


How should I send it to you ?


Can you share a txt file of code with me?

I will paste the code over.


Do you have an GitHub account so I can share my code from there, or can I send on email ?
I will not share my code here in public


I sent a message to you with the code


When you are ready I can send you info about two parameters you must set to make the bird balance correctly


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.