Getting Started: Programming with mBlock

The following guide will introduce you how to use mBlock, and how to program Robots / Arduino Boards with mBlock.

Download Guide (PDF)

Some Examples

 Drag the module block you need from Robots Area, select the correct port/pin.Then trigger the running event, you can see it works.

  • Control DC Motor


  • Control  Me 7-segments Display


  • Read the value of Me Temperature Sensor
  • Control the Me RGB LED


mBlock Books

We have created some lessons about graphical programming and robotics to  help teachers or kids get started easier.We suggest you start learning graphical logical programming with Scratch 2.0 The Adventures of Mike,then learn how to use Scratch2.0 to interact with mBot with the book mBlock Kids maker rocks with robots

Scratch 2.0 The Adventures of Mike

Scratch 2.0 The Adventures of Mike

Scratch 2.0 the adventures of Mike has nine chapters with different projects. Kids can explore the world of Scratch 2.0 by creating a lot of interactive stories, games and animation in the virtual world, aiming to help kids learn basic logical programming and know how the Scratch2.0 works. More resources about Scratch2.0

mBlock Kids maker rocks with robots

mBlock Kids maker rocks with robots

Kids maker rocks with the robots has twelve chapters with different projects. It can guide kids to enjoy fun of programming mBot in a lot of game scenes for learning graphic programming, electronics, robotics.

Resources and Going Further

(1) Arduino Firmware for mBlock: visit Github
(2) Makeblock Official Web Site:
(3) Makeblock Community:

Explore more about mBlock

Knowledge on Scratch is useful for using mBlock. If you are new to Scratch programming, you may check out one of Scratch books.

More Tutorials are available in the mBlock tutorial sections of mBlock Education.

109 thoughts on “Getting Started: Programming with mBlock”

  1. I can’t fini the app on my smartphone ( Samsung galaxy A3 ).
    via Google appstore it say’s the app is installed.
    blue tooth connection with ultimate robot kit is also recognised as present.
    but i can’t find the app in my library.
    can you help me out how to proceed?

    1. On smartphone, we provide app named Makeblock ;
      Now the app can control your ultimate robot, and we will add the coding function in the later Q2.

      From, you can download mBlock for windows and mac.

  2. Hello my mbot ranger dont work with tablet app and with mblock program .how i can reset my mbot ranger factory setings?

    1. I’d also love to get copies (mblock and arduino) of the code for the three basic programs. I know the line-follower program code is available, but I’m much more interested in the ultrasonic avoidance. I’ve checked github and didn’t see it there.

      Can we get a link or a zip of the code, please!?!

  3. Assembled the mBot very quickly and everything worked as planned. Now working on learning and using mBlock. Impressed overall. You guys could use a native-English speaker on staff or perhaps run things through a service or translator here in the States – it would help immensely for English speakers. Not that there’s any confusion – there’s not! You’ve done a great job, but like most things, it could be improved.

    I would do a bit more of a single-page, step-by-step progression (i.e.:) 1) assemble your mBot and try it out. 2) here’s mBlock software and some tutorials, then 3) here’s Arduino code/IDE and how to integrate other hardware. Again, you’ve done a great job and I’m watching things improve, but it’s somewhat scattered about. It would really help first-timers learn and progress quickly from using the remote and apps to becoming actual robotic programmers.

    1. Hi Al,

      Thanks for your advice, we will keep on improving and pay more effort to make it much easier for the users.

  4. We are in the programming phase, but how do we get mBot back to the original pre-set modes (IR control, obstacle avoidance and line-following mode)?
    Pressing the on-board button has no affect.


  5. ON this web page under the Heading, Explore more about mBlock

    Both links for “More Tutorials are available in mBlock Blog and the mBlock tutorial sections of Makeblock’s forum” are 404 (Not Found), can you point me to additional Makeblock tutorials?

    1. Hi Keith,

      Great thanks for your feedback!
      The mBlock Blog acctually doesn’t existed, we have deleted. We have fixed the other link.

  6. C:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.cpp,-o,SoftwareSerial.cpp.o
    8-28 20:42: ####Error####
    C:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.cpp:44:28: fatal error: SoftwareSerial.h: No such file or directory

    when upload to arduino

    that id what kind of error

    1. Hi lee jin seok,

      Could you please kindly send your program to my email address (

    1. Hi Peter,
      I may not understand your problem properly. Could you describe the issue with details in English?

      1. I tried to translate it I hope you know what this means
        arturito in beats is Prrr, it is for the November Scupi

  7. Hi my robot starter Kit robot tank is stoping and starting after I give the commands through the make blok app

    1. Hi Bob,

      Please upgrade the firmware for the starter robot first, then reset default program for it have a try. I will send you the details steps to your email. Kindly check it.
      Besides, please also change the battery have a check.According to our test and research, it is suggested to use rechargeable Li-ion battery or rechargeable nickel-metal hydride, nickel-cadmium which can be bought from amazon or local shop. Or Alkaline battery with good quality like Energizer, DURACELL.

    1. Hi Manuel,

      Do you mean that you want an example program for Ultrasonic module? Actually, it is determined you use the Ultrasonic module on which main Board. If you have mBot, here is an example program for Ultrasonic module:
      If you use Ultrasonic module on Orion board, you may also refer to this program, but you need choose Orion board under the Board option of mBlock.

  8. Is there a selection for the Makeblock Me Auriga?
    Does Makeblock HD work with this device?
    Is there a complete install program for this device that includes all the Makeblock accessories?

    1. Hi Robert,

      Yes, there is an option mBot Ranger (me Auriga) under Boards on mBlock software.
      Makeblock APP HD work with the Ranger robot.
      Sorry that may not quite understand your requirement in last question.

      1. I sincerely hope you have a wonderful holiday with lots of pictures and make wonderful memories with your loved ones.
        I’m interested in the Me Auriga and programming with all the available modules. Is there a book with example scripts?

  9. Hi
    We use Linux Ubuntu in our school. How do we use Mbot and Mblock ?
    Is it possible with wine ?

  10. Hi,

    Is there any way I can use a script from the PC in the cell phone in order to control the robot?

    1. Hi Manuel,

      The program sript from mBlock cannot be used on the mobile App.
      You need creat a project in App and reprogram it.

  11. hi,
    could you tell me where is the switch on button for the robot my computer isn’t recognizing it when i try to serial port it

    1. Hi Burcu,

      Which robot do you have?
      If it is mBot, the power switch is the black one which near to the Motor interface on mCore board.
      Besides, what is the operating system of your PC? Have you installed the Arduino driver on the PC?

  12. Hi! Is there an extension for LittleBits Arduino modul available? If not, something on its way?

      1. i am not able to add extension error show “extension name is empty” but it is not

  13. Hello
    The line follower does not work.
    This is my error :
    ‘MeLineFollower’ does not name a type
    Error compiling.

    Thanks for helping me

    1. Hi Val,

      Which robot kit do you have?
      You may upgrade firmware for it with latest version mBlock and try again. Once there is still the error, kindly send your example program for line follower to

  14. The problem with your learn pages, is , you offer a download for building the robot (add on swrvo pac for example, but the others as wel) which works fine, but you also offer a programming link. This is a .RAR file that zipped and unzipped Incannot read neither on ipad or PC. I have no software to opwn .RAR files. Also my ipad warns me that it is a corrupted file.
    Maybe you can check into this and make it easier accesible.
    Thanls for all the other info you send me , it did help me out alot.

    1. HI my mbot is not working with IR remote provided by manufacturer how can reset it to factory settings

  15. Hi, I’ve accidentally overwrite everything in my mBot. It won’t even make a single noise when it is connected. How do I revert it to default setting(that it it sings and move when I click the button on the mCore board)

  16. Hello, I’m trying programming of the mBot Ranger.
    The ranger works with the Makeblock app running on Android. It runs on manual program, so I can control motors with the joystick, led diodes etc.
    So I started to leard programming, I installed mBlock to my Windows 7.
    I installed the Arduino driver and connected Ranger via USB (the connection indicator is green).
    The commands for setting led works perfectly.
    But the commands for motors doesn’t work at all.

    Please can you help me? What’s wrong?

    1. Hi Filip,

      When you test the commands for motors, please make sure the power switch on the ranger is on and mBot ranger is also powered by the batteries. Otherwise the motors won’t get enough power to rotate if only with the power from USB connection.

  17. When I go into the mBlock graphical program space I wen’t to click on ‘robot’ under scripts it shows nothing. I am hoping to get my robot running in cool ways but I can’t program it.

    1. Hi Carter,

      Do you mean there is no program blocks under the robot script?
      What is the operating system of your PC and which version mBlock did you install? You may uninstall the software and re install the latest version 3.4.4 have a try:
      If it is possible, please kindly check with another PC.

  18. Hello, I have mbot. A few days ago I also received the robotic arm add-on pack for starter robot kit. Do you think I can use it on mbot also (eventually buying some additional piece) and try to program it by using the scractch compatible version? Thank you!

    1. Hi Luca, the robotic arm add-on pack for starter kit doesn’t work on mBot since the mCore doesn’t have the port to drive the motors on the robot Arm.

  19. I’m attempting to update firmware on my ranger using my macbook. Everytime i plug mbot into usb on computer it causes it to crash and it continues to restart and crash as long as i have the usb plugged in. Can I update firmware from a macbook or only from pc?

  20. I download the software and try to get the 2.4g wireless serial to connect but is not doing anything

  21. Hello, can i add attiny85 in mblock ?
    can you give me the tuto to programing attiny with mblock please ?
    think you

    1. Hi Nolan,

      What is the detailed issue when you connect mBot to computer?
      There is no serial port of mBot available or what?
      Have you installed the arduino driver? When you connect PC to mBot, please make sure you have pulled the switch on mBot to on.

    1. Hi Gus,

      Do you want to use mBot Bluetooth to mobile App (Makeblock) or to mBlock software on Computer?
      What is the error when you tried to pair the Makeblock Bluetooth signal? Can you see this Bluetooth name? Please kindly provide more details to email, thanks!

    1. Hi Customer,

      You can connect the mBot to PC with USB cable,and then connect serial port of the USB connection under Connect-> Serial port option on mBlock software. Please refer to this link.
      If you want to connect through Bluetooth instead of USB cable, you can refer to this video.

  22. How do i download mBlock onto my chromebook? is there a link for that and is it possible?

  23. I bought 20 of the IR mBot starter kits for my STEM class. My students assembled them quickly and easily. However, we are having trouble programming them to run correctly. Our robots are just running in circles. We are using the scratch 2.0 system and are following the printable guide, but they aren’t responding. Any help would be much appreciated.

    1. Hi Ashley,

      You have the mBot robots or the starter robots?
      For the issue that robots run in circle, please reset default program for the robots with mBlock.
      Besides, please make sure there is no wire touch one side wheel or the floor?

      Once still the same issue, please kindly take a video to show the issue and send it to

  24. Hello,I have installed Arduino on Windows 8.1 for my starter robot.It opens up,but is not finding the drivers to recognize the robot.Is there another version or a fix for 8.1?

    1. Hi Scott,

      You can download the Arduino driver from this link, please install it have a try.
      Or you can install the arduino driver through mBlock software either (Under Connect-> Install Arduino driver)

  25. Hi
    I just downloaded mBlock and tried it on a arduino board. It works but it seems that you can do scratch (on the screen) OR real world (arduino, sensors, actuators…) but not both
    I would like to move the cat on the screen with data from sensors connected to the arduino (joystick). It is possible with s4a but how can I do it with mBlock ?

    1. Hi Ariane98,

      Normally, you can control the panda’s movement base on the value of the sensor. You may check your program or send your program to us have a check.
      For further feedback, you can send email to

      1. Hi
        1)i have ultimate old version. I just installed tank arm and download the makeblock for android mobile phone. It works only back and forward motion but the gripper and up-down motion don’t work. I seted the factory default and upgrade the ardiuno me orion firmware but it wasnt work.
        2)How can i access the ultimate tank arm old version codes?
        Can you help me this questions please?

  26. Does any now the right way to program the ultra sonic senor on the robot starter kit? what the youtube videos show does not work.

  27. I have the Laserbot, but have some problems with engraving/cutting, when I make engraving the laser is very strong and working fine, but when I try cutting its very weak and are almost no making on a paper? have tried to adjust the power of laser to 100% and also adjusting fokus, but no improvements?

    1. Hi, par,
      As the problem you described, please edit the engraving time. Engraving Time: the time for burning a pixel point in mm. The shorter the time is, the less obvious the effect will be.
      For further information, please visit LaserBot FAQ section on this link.

    1. Dear Forti,
      Thanks for letting us know the invalid link. We have already fix the link, please kindly check it : )
      Best regards,

  28. Bonjour
    Après de nombreux essais, j’ai un problème pour faire communiquer le Starter Bluetooth version avec mon smartphone Asus Zenforce ou ma tablette Samsung A6. Le Makeblock_LE est vu mais ils ne peuvent pas communiquer. J’ai bien sélectionné la carte starter, le bon port com (5) et j’ai transféré les données. Mon PC signale bien la présence du robot sur le port com (5). J’ai essayé avec les versions 3.4.11 et 4.0.4 du logiciel Makeblock. Rien ne fonctionne.

    1. Dear Gilou73,
      As the issue you described, we are wondering if you have installed the correct Makeblock app on your smartphone. The latest version of Makeblock app is 3.0.9. Could you kindly search Makeblock app on Google play and download it please?

  29. Is it possible to program a Starter Kit Robot by using the iphone/iPad ?
    I found two apps for iphone, one called “MBlock” and one called “Makeblock”.
    The “Makeblock”-app seems to support my Starter Kit robot but only with a basic interface for control the Robot by using some controls in the program.

    The “mblock” app seems to have what I need – a scratch-like porgramming language which could be used to build own programs to control the robot. BUT: it only seems to support the “mBot”-type robots and not the Starter Kit” robot. If I try to connect the iphone/ipad “mblock app” to my Starter kit robot via bluetooth it say: unknown/unsupported firmware.

    So: Is there a iphone/ipad app which can be used to program my starter kit robot via Scratch?

    1. Hi Elmar,

      Yes, only the Makeblock APP support Starter on mobile devices.
      But the Makeblock APP has the program function too.
      After connected to Starter Bluetooth, the APP goes into the Starter’s Play panel by default, but you can slide the screen and find the Create Panel,enter it and you can program for the robot.

    1. Dear Ramesh,
      It is beyond our supporting abilities for Non-Makeblock products, which is the Arduino Nano Kit in your case. We would suggest you to search on our forum and check if there is any similar project like yours.
      Best regards,

  30. Hi…Instructions are not very clear and it would be definitely very difficult for school kids to assemble the robots ….improve the support base and print some new and clear instructions…make the instructions available online so that the people who have already purchased your product can also download the improved versions.

    1. Dear Ashish,
      We appreciate your feedback. Could you tell us which specific part of the assemble instruction needs to be improved? We would like to hear more details of it.
      Also, here is the download link for instruction of mBot, have you visited it?
      Best regards,

  31. Hi,

    I have a mRanger robot. I need to move the engines to a different speed each other, like this instruction in mBot: set Motor M speed X.

    What instruction must I use to do it with mRanger?

    Thanks in advance.


    1. Dear Michel,
      Please use the block, for instance, “set encoder motor on board slot 1 at the speed of 100rpm”.
      Best regards,

Leave a Reply

Your email address will not be published. Required fields are marked *