[Fjord Carver] brings together an RGB LED and CdS Photoresistor to make a color sensor. Those Cadmium Sulfide lights sensors usually have a very wide swing of resistance when exposed to varying ...
static const int LED_MAX_BRIGHTNESS = 255; static const int PHOTORESISTOR_MIN_VALUE = 0; static const int PHOTORESISTOR_MAX_VALUE = 1023; static const int LED_RANGE = (LED_MAX_BRIGHTNESS - ...
This sketch uses a photoresistor to control a RGB led when detect less light than the limit (It is based to the 0...1024 from the analog reading). //Description of the RGB led pins. Please add 330 ...