Introduction: How to Use Scratch or Arduino to Program a MBot With Makeblock
A few days ago, I made a robot by Makeblock. We call it mBot---a robot better fit education and home use. It is simple to use, and more affordable. We believe this is the best robotic product in its category.
The mBot is designed especially for mBlock to help teachers and kids to have hands-on experience about robot and explore STEM education.
By the way, this project will probably issue on kickstarteraround March 17.
Now I will show you how to build it by steps.
Step 1: Introduction of Mblock
The mBlock is a customized version of Scratch which is a graphic programming language(developed by the lifelong kindergarten group at MIT Media Lab). With mBlock, those who are familiar with Scratch can easily interact with electronic modules in Arduino eco-system. Its electronic modules is based on Arduino open source platform, and mechanical parts are compatible with Makeblock parts and lego parts, so it is easy for you to extend.
Step 2: Tools You Need
Step 3: Mechanical Part List
1*Metal Base Plate
2*TT Gear Motor
1*Plastic Universal Wheel
1*Magic Tape 20*30mm
6*Brass Stud M4*25
14*Socket Cap Screw M4*8
4*Philip's Head Screw M3*25
2*Tapping Screw M2.2*9.5
Step 4: Electronic Modules List:
1*Arduino Based Control Board
1*Me Ultrasonic Sensor V3.0
1*Me Line Follower V2.2
1*Me Infrared Controller
1*Battery Holder for (4)AA
1*USB A-Male to B-Male Cable
Step 5: Build the Mechanical Part
The construction of mechanical part mainly is building the motors and wheels, and the motors are TT Gear Motor, which are usual in our lives. To assembling them together is very convenient, because you just need to tighten several screws. The pictures above will show you some details in assembling processes.
Step 6: Build the Electronic Part
The construction of the electronic part mainly is building the electronic modules together and wiring. The electronic modules that you will use include the Line Follower module, the Ultrasonic Sensor module, the Bluetooth module and the Arduino Based Control Board. (The Bluetooth module and the Arduino Base Control Board are fixed together already.) I will show you the details in assembling process as pictures above.
Step 7: Use the Scratch （mBlock） to Programming
The mBlock is a customized version of scratch. It is easy to use mBlock to interact with electronic modules.
For more information about mBlock, please visit mBlock website listed below:
Step 8: Use the Arduino IDE to 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.
Following is one simple code for controlling the mBot by Infrared Controller.
double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
For more information about Arduino, please visit website listed below:
Step 9: Playing With It！
We can use the mBot built by ourselves to play some games or make them complete some functions autonomously, such as playing football, ultrasonic obstacle-avoiding and following line. The videos above will show you some ways to play with it.