This is my first robot, built with Lego Mindstorms, which I’m planning to use to teach the kids at Berkeley Youth Alternatives about computer programming. The idea is pretty simple: the robot uses an optical sensor pointed at the ground to detect the black lines of the maze. When it hits a “wall”, it turns 90 degrees to the right and tries to continue. If it hits another wall right away, it spins 180 degrees and continues on its way. The algorithm is far from perfect, as there’s no way for the robot to detect a gap in a wall that’s parallel to its path, and if it were to travel all the way down a dead end, it would get caught in an endless loop of 180 turns, bouncing back and forth between the walls. But I think it will be a perfect entry point into the concepts of programming. From here I hope to iterate on the program, teaching the kids about incremental development. Ultimately I’m going to work with the students to create a program which can not only find its way through the maze, but remember the solution for the next time through, hopefully even learning and storing several mazes at a time.
This is my first stab at developing a large(ish) curriculum, and the kids, though often insightful, can be a handful. My goal is to take this thing that I enjoy so much (building and programming) and show the kids how all of the tedious homework that we work on every week can be applied to making something interesting. That’s the plan at least. I’ll let you know how it goes.
And a very special thank you to Tiny Carlsen for the donation of the Legos.