I'll be putting all of the code for the class I'm teaching in a Github repo after I teach the class so that I can properly document everything in the ebook I'll be publishing in late March/early April. The ebook will have the lessons, exercises, etc. as well as set up information and lessons learned.
I'm looking at a $5-$10 price tag for the ebook to help fund the robotics team I'm sponsoring, but the primary intent is to encourage robotic programming and to help others. The kids in the team want to get the Ultimate Robot kit and are looking for ways to earn the moneys to do so, and this seems like a good way to help them out.
With regard to the algorithm, it's a simple wall follower (left hand wall). I'm using the black lines for navigation (moving forward and turning). The robot stops when the linefollower sensor returns 4 (both sensors off of the line). I was trying to use the ultrasonic sensor for ranging, but it proved to be too jittery/inaccurate for my needs, so I ran a series of tests to determine how long the motors needed to run to cover a certain distance at a certain speed. I use the ultrasonic sensor to detect whether or not a wall is in front of the robot (hence the frequent turns to test for an intersection).