Getting started with Arduino C coding with mBot Ranger


Hi all.

I bought my son the mBot Ranger for Christmas with the intent of introducing him to coding, I’ve programmed Arduino boards before for other purposes and felt the Ranger would give him a good set of standard inputs and outputs.

Built the robot and all is working as expected with the mobile App/Bluetooth.

I downloaded mBlock and all good with that too…

I’ve installed Arduino, USB driver, MakeBlockDrive library, selected Arduino/Genuino Mega or Mega 2560 as the board.

All the examples compile and appear to upload as expected (communications LEDs flash), however nothing actually does anything (initial trials with LED and audio outputs). I tried uploading Firmware for Auriga, which works fine!

I’ve replaced the header definition in the examples with #include <MeAuriga.h> as described in the readme, I’ve had a look for hints in the range resources, but no joy. I’ve googled, I’ve searched and feel I’m almost there, but frustratedly not got the final piece of the puzzle.

When I upload the code, the TX and RX LEDs flash, the RX LED goes out and the TX LED stays on.

Can someone please give me some ideas as to how to proceed? I presumably missing something fairly obvious!


I tried some serial output, and that tells me that the code is in fact running, but I’m getting no control of either LEDs or buzzer with the examples in the pack. Not sure what I’m doing wrong, but at least the code is confirmed as running. the examples I’ve been trying are MbotBuzzerTest, MbotBuzzerTest2, and the Led Matrix example - am I simply using the wrong examples, and is there a library manual anywhere?


Anyone at all able to help? Is there support in this forum?

I’ve found the additional Auriga examples buried in the folders (there aren’t many…) and figured out the audio from the Auriga firmware, but it would be helpful if coding this would have been a little better documented. I’m going to have to start now on figuring out the drive motors and not looking forward to it, but I’m sure the firmware will help.

There has to be tech docs somewhere for devs, but I’m unable to find them.


Here are some links that may help you.


Thank you Dr-roboto, I also found Victor Leung’s documents here: mBot Arduino Programming Guide (I/O)

Thankfully, after much head scratching, I already have the basics done and running,

it’s the specifics of the Auriga/Ranger interfaces I can’t find. Chuck McNight and Victor Leung’s examples are all MBOT and the Doxygen code documentation is completely non-board-specific, but thank you for your reply, I appreciate you taking the time.

Maybe I’ll end up having to create my own documentation and release it into the public domain, but it would be helpful if Makeblock support/dev would take the time to document their APIs for each board in some detail.


You will have to do what others have done. All the raw info is in

and you will have to build you own C documentation.

I had to do the same on the python side.


Thanks again @dr-roboto .

It seems a little odd that every customer has to write their own documentation when the rest of the non-c documentation is actually pretty decent. I guess it must be such a small piece of their actual market.

I was hoping that someone had already some documentation, or there was a wiki somewhere on which we could collaborate since the product is now nearly 3 years old. Ah well - off I go to research and create!


I’ve started a document here: inspired by Victor Leung’s excellent reference. It’s not finished yet, but it’s a start and hopefully others will collaborate with me to make it better, some day, maybe.

Feel free to share this link across forums etc if you think it’s useful.

#TeachKidsToCode #STEM #NotJustmBlock


One particular piece that I’'m trying to figure out is the on-board 180 optical encoder motor functions. I can set them to run at specified speed (RPM?), change direction, move an absolute or relative distance etc, There are various modes - Direct, PID and PWM, but I can find no documentation on the modes and the functions they offer.

Is Mark Yan around? Does he have any documentation or knowledge he could share in this respect?


Just an additional note that I’ve enabled comments on my document. Input welcome either there or here.


WELCOME TO MY SHOP <<<<<<<<<<<<<<<<
+++++ Hi all New customer +++++
-Are you realize dream enrichment by working make money online,and the job you are working have on the list of our Job ?
If the answer is yes,What are you waiting anymore??? Let cooperate us to make money and realize that dream together.
-Would like to introduce we are Anonymous - We are Team Make Money Online and I’m Leader of Team.
-We’re looking for good and long-partners for our Business.
-We Doing a lot of work online and have each member for each job to ensure time for Partners.
-Working friendly, high sense of responsibility,fast,quality,reliable and ensure absolute security 100% for Partners.
-Motto of work : Prestigious is top - Customer is God.
-Always have special deal for Best Partners as well as long-partners.
-I’m sure you will be satisfied if work with us.
-------------> LIST MY BUSINESS <----------
1> Software BUG Western Union Version 2019 + WU TRANSFER Online
…3> Hack Card Dumps Track 1&2 with pin, many types card.
…4> Sell PAYPAL acc (Email address + PayPal pass) fullz infomation
…5> ATM cards with high balance + Security code (easy to withdraw)
…6> Hacking Bank acc + Bank Login (US + UK)
===>> Please contact me at :

Contact Us

******* Adress ICQ : 750224172
******* Adress ID gmail: sellerprivatevip@gmail. com
******* Telegram : @linkstrade

=======>> SELL GOOD CCV <<=========

  • Us (Visa,Master) = 15$ per 1 - Us (Amex,Dis) = 20$ per 1 - Us Bin 25$ , US Dob 25$ - Us fullz info = 60$ per 1
  • Uk (Visa,Master) = 20$ per 1 - Uk (Amex,Dis) = 25$ per 1 - Uk Bin 25$ , UK Dob 30$ - Uk fullz info = 70$ per 1
  • Ca (Visa,Master) = 20$ per 1 - Ca (Amex,Dis) = 20$ per 1 - Ca Bin 25$ , CA Dob 30$ - Ca fullz info = 60$ per 1
  • Au (Visa,Master) = 20$ per 1 - Au (Amex,Dis) = 25$ per 1 - Au Bin 27$ , AU Dob 30$ - Au fullz info = 60$ per 1
  • Eu (Visa,Master) = 30$ per 1 - Eu (Amex,Dis) = 35$ per 1 - Eu Bin 35$ , AU Dob 40$ - Eu fullz info = 70$ per 1


Could @tech_support possibly do something about the ever increasing spam in this forum? I’ve flagged many posts , but still they remain to keep posting more.