Discrete RGB colour sensor using a colour LED flashing at high speed and a monochrome LDR (light dependent resistor) for detecting the colour via ADC conversion. The library implements interrupt driven ADC conversion at high speed (370 RGB readings per second, 128 times oversampling per channelfor noise reduction). The detection can optionally run in background.

Dependents:   rgb_sensor_buffer discrete_rgb_color_sensor_example

Revision:
6:fc64a14a2f4a
Parent:
5:1fed2b68e661
Child:
7:0d35392230be
--- a/rgb_sensor.h	Sat Jun 28 06:59:51 2014 +0000
+++ b/rgb_sensor.h	Sat Jun 28 16:02:24 2014 +0000
@@ -27,7 +27,7 @@
 #endif/*RGB_LED_ON*/
 
 #ifndef RGB_OVERSAMPLING
-#define RGB_OVERSAMPLING 128
+#define RGB_OVERSAMPLING 1024
 #endif/*RGB_OVERSAMPLING*/
 
 #ifndef RGB_MAX_ADC_CLK