Then Install the SAM LED and SAM Light Sensor in the appropriate place. Also install the SAM Servo and connect the shaft to the LEGO shaft. Best way to do this is with a little bit of tape as it doesn't need to handle much force.

Power all the SAMs on by pressing the power button on each SAM.

Then make the software in the SAM space to detect the colors and control the servo.

When the SAM Light Sensor reaches a certain threshold (e.g. 81 in our case), the SAM Servo should change position. We used a software hold block to give the balls some time to reach the servo when they are detected by the Light sensor.