oooga

Dependencies:   HMC6352 Servo TextLCD mbed

Revision:
0:e0e1b495278b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ColorSensor.h	Wed Sep 11 05:21:06 2013 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#define RED   0
+#define GREEN 1
+#define BLUE  2
+#define OTHER 3
+class ColorSensor
+{
+  private:
+    DigitalIn *Dout;
+    DigitalOut *Range;
+    DigitalOut *CK;
+    DigitalOut *Gate;
+    int time;
+    double R, G, B;
+  public:
+    ColorSensor(PinName Dout, PinName Range, PinName CK, PinName Gate, int time);
+    ColorSensor(void);
+    void getRGB(unsigned short RGB[]);
+    void getRGB(unsigned& R, unsigned& G, unsigned& B);
+    unsigned checkRGB(unsigned& R, unsigned& G, unsigned& B);
+    int judge();
+    void setWhite();
+};
\ No newline at end of file