Implementation of the light sensor driver and gain control for the human visible photodiode sensor on Tmote Invent.