In which we use the various sensors of our mBot to navigate a deviously challenging obstacle course.
The main sensor we rely on is the downward-facing line sensor. This allows us to detect a black mark on the ground, and since there are two sensors built in to the mBot, we can tell whether we are to the left or right of center, centered on the line, or off the line entirely.
We first brainstormed features of the obstacle course on the whiteboard…zig zags, right angle turns, curves, a bridge, a pillar, and walls. At times, the line disappears, and we must rely on other sensors (like the ultrasonic proximity sensor and the ambient light sensor) to navigate.
Programmed in mBlock (a version of Scratch for mBots), the robots needed a strategy robust and flexible enough to navigate each of the obstacles without human input. At the end of the course, they must detect the finish line and play a victory song.
The robot to complete the course in the shortest time wins!