Learning Arduino Programming

Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects.The Arduino development environment makes it easy to write code and upload it to the i/o board. You can use Arduino language(C\C++) to interace with Arduino hardware.
We provide a complete Arduino using environment.

Step2 Install Makeblock Library for Arduino

  1. Download the library zip package: https://github.com/Makeblock-official/Makeblock-Libraries/archive/master.zip
  2. Decompress the makeblock folder in the zip to the Arduino default library:
    • Windows 7: “[arduino installation directory]\libraries”Your Arduino library folder should now look like this (on Windows):
      [arduino installation directory]\libraries\makeblock\src
      [arduino installation directory]\libraries\makeblock\example
    • or like this (on Mac):
      [arduino directory]\Contents\Java\libraries\makeblock\src
      [arduino directory]\Contents\Java\libraries\makeblock\example
    • or similarly for Linux.
  3. Open the Arduino Application. If already open it, you need to restart to see changes.
  4. Click “File->Examples”. Here are some test program

Step3 Basic Example

What you need:
Starter Robot Kit or Ultimate Robot Kit to build a ultrasonic car.

  1. Connect Arduino and PC with a USB cable. In Arduino IDE, click “File->Examples”, and choose an example.arduino example
  2. Choose the board type and COM number.
    • Orion/mCore — Select Arduino Uno
    • Auriga/MegaPi — Select Arduino Mega 2560
    • Me Baseboard — Select Arduino Leonardo

    arduino board type

    arduino serial port

  3. Click “Upload” button to compile and upload the code. It will show “Done uploading” in about 1 minute.


Resources and Going Further

(1) Getting Started with Arduino
(2) Makeblock Library: visit Github
(3) Makeblock Official Web Site: http://www.makeblock.com/
(4) Makeblock Community: http://learn.makeblock.com/

50 thoughts on “Learning Arduino Programming”

  1. The hardware kit is exceptionally well designed – easy assembly, strong/quality components. The sensor and other interface components are also well thought out with good variety of components and excellent manufacturing. Unfortunately for this kit to be successful it really needs more and better quality instructional materials. Virtually nothing is explained with regards to mbot modules. The communication extensions are even less obvious.

    PLEASE PLEASE do something about your support materials. The few video tutorials available are not nearly enough for the average student to
    figure out on their own.

    FYI – I am familiar with the Scratch environment and well versed on the Arduino hardware and IDE.

    1. Dear Libero:

      Appreciate for your advise, we have worked hard on the instruction and we will focus more on it.

      Best wishes

      1. The robot seems of good quality but the follow up instructions and support materials are either non-existent or do not work. I am appalled by the lack of after sales support and information. You basically purchase an expensive bit of technology and then are completely left to your devices to try and work out how to use it, which is next to impossible. This renders the robot effectively useless and the whole process incredibly frustrating. Very poor considering the cost. Why on earth is there not a users start up booklet, the only information provided is building instructions?

  2. I would love to be able to add code to mbot default.
    Add a servo mounted Ultrasonic to look for best path forward
    or display messages on matrix
    I can’t figure out how to compile the existing code. (get lots of errors)

  3. I found Arduino Drivers just only for Windows and Mac OSX, is there any drivers for Linux(Ubuntu)?

    1. Hi Yuanm,

      Here we do not have the driver for Linux since we have no software developed for Linux, you may check on Arduino website and see if there is a driver for linux.

  4. hi i have mbot and i wanna reset every thing i uploded , by mbot [the program],to arduino.also i wanna reset it by using arduino,thanks

    1. Hi Doaa,

      You can reset the default program for mBot with mBlock software, please refer to the FAQ “How to reset default program manually?”in this link:

      If you use the Arduino software, there is no reset default program option, you can upload a new program to the mBot if you just want to clear the previous uploaded program.

    1. Hi Andrew,
      Do you mean the Arduino driver, what is the opearating system of your PC? You can install the Arduino driver through mBlock software (Under Connect-> Install Arduino driver)

    1. Hi Carl,

      Do you have a mBot robot, it is suggested to program for it with mBlock software or Makeblock App HD since it will be much easier for the graphical program.

  5. hi
    I downloaded mbot library.But,in word examples I did not find( makeblock drive).I find the word (makeblock).And i did not find the choice (firmware for mbot)

    1. Hi URGENT,

      What do you want to do with mBot robot? If you want to upgrade firmware or reset default program for it, you can use mBlock software instead of Arduino software.
      I will send you some instructions to upgrade firmware and reset default program for mBot with mBlock software to your email address.

  6. Hello,

    I can’t see how to read the ultrasonic sensor while my Starter-IR bot is connected to the PC. I can turn on the motors and program them to do various things with mBlock. I’m familiar with Scratch, I see the block for the sensor, but it either reports a null value or 400 regardless of what’s in front of the sensor.

    Thank you,


    1. Hi Jay,

      Which version Starter robot did you use? Is the wall avoidance mode working on the starter robot after reset it to default programs?
      Besides, you may send the program which you use to test the ultrasonic sensor to our tech email tec-support@makeblock.com

  7. I been having problems getting this robot to work we have installed all that was told upload to.
    Program it with it is not programming at all need some help please.

  8. this was pretty helpful. but I have the starter kit tankbot . and also got the arm grabber. but how do I program that so I can also use it with the remote. help pls with good instructions. thx

    1. Hi Dude,

      You can program the robotic arm with mBlock software. I will send you an email to provide simple introduction.

  9. help!, ive made and programed robot tank so I can use with controller. but I just got the robot arm add-on. how do I program it too so it can be used by the remote also?

  10. Please Help,

    Every time i try to upload a program to Mblock, it’s doesn’t update firmware (stays at 0%) the whole time, takes more than 10 minutes, before i restart the software.

    Am i doing something wrong?

    please inform me.

    Am doing a project using your professional lab kit.

  11. Hello , I purchased a Makeblock Robotic Tank starter kit – IR version via Amazon (AMAZING BTW) for my 16 yo and the directions packet guides us to this website to download the folders for the coding. I currently have a Window 10 computer and I have downloaded the Windows download provided above in step 1 for the driver installation (no problem there) and also the download for step 2 for the makeblock libraries (also no problem). BUT when I open the downloaded folder to download and install the driver from step 1 I have a problem. It never tells me if it downloaded or where to find and use it?? I have looked every where and nothing can you please help?

    1. Hi Emma B,

      To play or program the starter robot, you can install the graphical program software mBlock directly.
      Please refer to the FAQ “How to reset default program for Starter_IR through mBlock” in this link to reset default program for starter, then you can play the starter with IR remote controller. Or you can program with mBlock software

  12. Hello,
    I don’t now to user the telecommande whis Orion card. Where is the bloc to creat a new programme?

    1. Hi David, which telecommande you want to use with Orion board, is it some module from Makeblock?
      Please kindly let us more details.

      For further feedback, please kindly send email to daisy@makeblock.com

  13. hi,
    I want to connect my MakeBloc Ranger robot to the wifi module.
    I pluged the RJ25 cable to port 5 of the arduino carte(orion) but I do not find the wifi on browser, to enter the IP adress As indicated in the wifi module manual !

    tank’s for your help

      1. Why have you not answered in public. Like made a video or written some instructions that you then can reference to?
        That will help a lot of people to helpl themself, so you will not have as many question, and more happy customers. Not everyone ask, they just drop it when they don’t find information.

        1. Dear Anders,
          Thanks for your advice! We will improve the customer service. By the way, have you ever visited our forum? You might be interested the discussion on the forum. Please click this link to access the Makeblock forum.
          Best regards,

  14. Hello I need the certificate of conformity EC for the Ultimate 2.0 -10-in-1 robot kit. I need this certificate for the custom clearance. Can you send it to me by mail please ? It’s very, very urgent.
    Mail : poune@mail.pf
    Thank you a lot

    1. Hi, Tatiana,
      We have forwarded your request to related personnel, and they will contact you soon.

  15. I am trying to get the ultra sonic sensor to work on the starter robot kit. I have followed the video tutorial. did exactly what it showed. uploaded to the robot several times. rewrote rewrote the completely 3 times Robot will move but not stop. It is connected to port 3. The light on the sensor is red. How do i resolve this issue?

    1. Hi, John,
      We have sent you the specific instruction to your e-mail. Please kindly check it.
      Best regards,

      1. Hello Admin,
        I have the mBlock app on my phone and can control the Makeblock Starter Robot Kit Bluetooth with the Joystik super. I can also perform a small movement program with obstacle detection – but the sensor often does not recognize the 10 cm that is on the small block. I can not edit in the phone – so I’ve tried with mBlock, but in Scratch, there is not the block and edit the Arduino IDE I can not yet. My flashing program SOS for the on-board LED works.
        A small driving program – both engines M1 and M2 to 100 – 1 sec wait – both engines M1 and M2 to -100 (thus backwards) -1sec wait – repeat all can be uploaded but the engines rotate differently, the tank turns. The modification and upload via Arduino IDE in mBlock will not work. That worked only with Scratch. What am I doing wrong ?

        1. Mr. Koch,
          We have replied you with more details to your e-mail, please kindly check it : )

    2. Hello Mr.Weeks,
      I have the same problem.
      Could you please send me the answer mail from admin? That would be nice !!! Do you program directly with mBlock or Arduino? Which version do you have? I have Win 10 running and try to program with mBlock.

      Thank you very much for your effort!
      I wish you a nice Advendszeit!

  16. The software do not run in my Kubuntu 14.04.5. Normally I do not have any problem to install deb packages since the architecture is the same of Ubuntu.

    When I try to run mBlock I get this insistent error:

    22.10.17 21:32 avahi-daemon Registering new address record for 2003:d6:cbcb:e501:45bb:f899:ebda:c22b on wlp1s0.*.
    22.10.17 21:32 avahi-daemon Withdrawing address record for 2003:d6:cbcb:e501:45bb:f899:ebda:c22b on wlp1s0.

    I tried to reinstall the software and restart the computer, but it did not work too.

    Please check this error. Thanks,

    1. What you have there are IPv6 addresses, which has nothing to do with Arduino or mBot. The messages in your exampel are from the avahi-daemon program. Google “avahi Linux” and you will get more information about what that is.

      You should probably install Arduino IDE to be able to program your controller in C / C++. The mBlock programming language I have not tried yet.

  17. I followed the directions for the robotic arm tank and I’m trying to write code for it in arduino, but I can’t seem to upload anything. It says I have a MegaPi so I’ve followed the directions to upload to it and have been trying to upload the “mega2560_firmware” file. Basically I just need to find what program I need to upload and how so that I can control my robot then write code for it.

    1. You should always try the simplest program first, which is to make a program that blinks a led (or digital output) in a low frequency. Then you know how to program, and that it works. Later you can program a more advanced program.
      You have to set the right Arduino board and the Right USB port.

  18. I downloaded the makeblock file and unzipped it to arduino libraries, but when I boot up arduino it says invalid library found How do I fix?

      1. You should probably make a FAQ and/or make an instruction so others could be helped. Like a video or something.
        Even if there are just one person, do always follow up with a proper answer, as others then can be helped by that answer.

  19. You should probably add your additions as a standard Arduino Library, then it is much easier to add to Arduino IDE, then have to find and download a Library, and extract it and copy to the right place. Which is different with each and every OS and many installations.
    Much more stable to let the software, Arduino IDE, handle it, and you learn to make an addition instead.

Leave a Reply

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