Arduino Source Code for mBot Educational robot kit


#1

Hello!
I recently acquired both the mBot Educational robot kit and the Starter robot kit for my kids. I was able to find the Arduino source code for the Starter robot kit as an added library, including the dual mode, IR mode and Ultrasonic wall avoidance modes. However, I have been unable to find the source code for the mBot educational robot kit. This robot comes shipped with the IR control, bluetooth control, wall avoidance and line following modes loaded onto the board. However, I like adding more features to these robots so it would be nice to have the Arduino source code for this robot as well!

Thanks for your help!

Steven.


#2

Hello,

Did you mean this file (link) ?
When this software is uploaded to the mbot board via the arduino IDE, the bot behaviour seems identical to the “reset default program” in mBlock software.
However, this file is 6-month-old and functions and constants naming are not consistent with the code generated from scratch blocks in mBlock software; a minor problem.

Cheers,


#3

Thanks for your response!

Looks like all the functionality is included in this code. However, there must be some changes in the language or definition of the board used. The 1.6.6 Arduino version I use doesn’t recognize:
include “mCore.h” (I tried replacing “” with < > with no luck).
{ mCore.h: No such file or directory }
whereas: Makeblock.h
does get recognized ok.
The board I selected under Arduino is Genuino/Uno, which works fine for the Makeblock Orion board. Not sure if the mCore board requires a different Board to be loaded in Arduino…

I’m sorry for my ignorance, just getting started with this adventure!


#4

You’re right, mCore board is Arduino Uno compatible and this choice worked for softwares other than mBlock.

I’m not sure what happened when you try to open/upload the .ino file with the Arduino IDE 1.6.6 : did you correctly get all the dependencies ?
On my side (OS X 11.2, Arduino IDE 1.6.7), I just cloned the repository (git clone https://github.com/Makeblock-official/mBot.git mBot) and open (mBot/mBot-default-program/mBot-default-program.ino) with the IDE. Compilation and uploading were successful.

Just a weird design from the Arduino IDE (.ino file should be named as the parent directory, write protection is a bit annoying, all files in the directory get opened in tabs, …)


#5

The header that worked for me was MeMCore.h.


#6