Programming mBot Ranger in Arduino

About Arduino

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.

Install Makeblock Library for Arduino

(Note: The Arduino installation package for windows is integrated the Makeblock library.)

  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 similar on Linux.
  3. Open the Arduino Application. If you have already opened it, you need to restart it.

In the Arduino IDE, you can choose File > Examples to view examples stored in the example folder.

A simple example

In this example, we update the firmware of mBot Ranger.

1. Connect mBot Ranger to your PC with a USB cable. In the Arduino IDE, choose File > Examples > MakeBlockDrive > Firmware_for_Auriga.

1.png

2. Choose the board type and COM number.

  • Makeblock Auriga — Choose Arduino Mega 2560
  • Makeblock Orion — Choose Arduino Uno
  • Me Baseboard — Choose Arduino Leonardo

3-1.jpg

mceclip0.png

 

3. Click the Upload icon to compile and upload the code.

After the uploading is complete. The message "Done uploading" is displayed.

You can view some other test programs to learn coding before you create your own projects.

References

Getting Started with Arduino
Makeblock Library: visit Github

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.