Download the SensorLight Arduno sketches here (.ino files):
SensorLights_Potent (for use with a potentiometer)
SensorLights_Potent (for use with a potentiometer)
SensorLights_KnockSensor (for use with a knock sensor module)
SensorLights_LightSensor (for use with a light sensor module)