Robin Newman’s Lego© Mindstorms© Page A beginner’s journey 2

First, I built a small addition to the main model, using the available third motor to which I attached a handle. I then connected it to the gate assembly motor, so that I could operate it by turning the handle, controlling the release of balls down the track. I set up a small test program to display the output of the colour sensor for each ball, and thus ascertained that blue gave output 2, green 3, yellow 4, red 5 and the white background (when no ball was present) 6.

I then started the main program

My first attempt at the main program broke the problem into the following logical steps.

This worked, fine, but the program was not very efficient, and the arm returned to the zero position between each ball, so I moved on to develop a more sophisticated version. more...