aiu

Dependents:   jumpROBO4_3 jumpROBO5_0 jumpROBO5_2 TX_Coloers ... more

Committer:
OGA
Date:
Mon Sep 23 06:30:00 2013 +0000
Revision:
0:745c9de82674
colorsensor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
OGA 0:745c9de82674 1 #include "mbed.h"
OGA 0:745c9de82674 2 #define RED 0
OGA 0:745c9de82674 3 #define GREEN 1
OGA 0:745c9de82674 4 #define BLUE 2
OGA 0:745c9de82674 5 #define OTHER 3
OGA 0:745c9de82674 6 class ColorSensor
OGA 0:745c9de82674 7 {
OGA 0:745c9de82674 8 private:
OGA 0:745c9de82674 9 DigitalIn *Dout;
OGA 0:745c9de82674 10 DigitalOut *Range;
OGA 0:745c9de82674 11 DigitalOut *CK;
OGA 0:745c9de82674 12 DigitalOut *Gate;
OGA 0:745c9de82674 13 int time;
OGA 0:745c9de82674 14 double R, G, B;
OGA 0:745c9de82674 15 public:
OGA 0:745c9de82674 16 ColorSensor(PinName Dout, PinName Range, PinName CK, PinName Gate, int time);
OGA 0:745c9de82674 17 ColorSensor(void);
OGA 0:745c9de82674 18 void getRGB(unsigned short RGB[]);
OGA 0:745c9de82674 19 void getRGB(unsigned& R, unsigned& G, unsigned& B);
OGA 0:745c9de82674 20 unsigned checkRGB(unsigned& R, unsigned& G, unsigned& B);
OGA 0:745c9de82674 21 int judge();
OGA 0:745c9de82674 22 void setWhite();
OGA 0:745c9de82674 23 };