How I Hacked The mBot Ranger Kit For Autonomous Driving Capabilities

Two weeks ago, I wrote a review of the mBot Ranger kit. It was for the first time when I’ve been playing with a Makeblock kit, and I was impressed. Quality components, a lot of room for further extensions, etc. You can read more about my experience with the kit in the mBot Ranger review. In this post, I’ll continue my experience with the mBot Ranger, and I shared with you how I hacked the mBot Ranger kit to work autonomously using the ultrasonic sensor.

After 30 minutes of working, I assembled all the hardware components of the mBot kit into a nice robot tank. I was very happy, at least until I get into the software side. The kit can be programmed via PC or using an application. Very soon I found that I have some problems with the documentation, and the software version of the smartphone was not up to date because the kit hadn’t been released at that moment. Regarding the tablet version of the software, I don’t own a tablet. (Yes, I don’t want a tablet!)

Luckily, I knew that the brain of the robot is a Me Auriga brick based on Arduino Mega 2560. Being an Arduino fan, I know what to do to move forward.

The plan was to search in the libraries and find the pins to control the robot motors using the Arduino sketch. After a few minutes of research, I found the pins that I needed to control the two DC motors. Working with the ultrasonic sensor was much easier. I use the Makeblock library to read the distance from it.

The idea was to program the robot tank to detect an obstacle, and when the sensor detects one or more obstacles, the robot turns right until the sensor no longer detects any obstacle.

Here is the Arduino sketch and the result of my work with the mBot Ranger kit.

Makeblock mBot Ranger Kit Autonomous Mode

Share:

Related Posts

Don't Miss Out!

Get the latest news, tutorials, reviews and more direct to your inbox when you subscribe!