Need help coding for light sensor linked to motors

Take readings of the light level, when it gets to a certain threshold, turn the motors on.