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
scratch_example

 

  • Control  Me 7-segments Display

scratch_example_2

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

scratch_example_4

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 https://scratch.mit.edu/.

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: http://www.makeblock.cc/
(3) Makeblock Community: http://learn.makeblock.com/

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 Makeblock’s forum.

93 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 mBlock.cc, 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.

    Thanks!

  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 (tec-support@makeblock.com)?

    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: http://learn.makeblock.com/en/mbot-programming/
      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
    Val

    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 tec-support@makeblock.com

  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:http://learn.makeblock.com/en/software/
      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
    JB

    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 daisy@makeblock.com, 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 daisy@makeblock.com

  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 daisy@makeblock.com

      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?
        thanks
        Birkan

Leave a Reply

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