Basic library for the TCS34725, based off of several example programs and the Adafruit Arduino library
Dependents: MF_FUJIKO_BASE STEM_2019 STEM_2020
Diff: TCS34725.h
- Revision:
- 4:41f1acad69e5
- Parent:
- 3:afb107db7994
diff -r afb107db7994 -r 41f1acad69e5 TCS34725.h --- a/TCS34725.h Wed Jan 25 20:17:57 2017 +0000 +++ b/TCS34725.h Wed Mar 22 20:54:37 2017 +0000 @@ -62,7 +62,7 @@ * } * * while(1) { - colorSens.getColor(&r,&g,&b,&c); //pass variables by reference... + colorSens.getColor(r,g,b,c); //pass variables by reference... * pc.printf("DATA: r%d g%d b%d c%d", r, g, b, c); * wait(0.5); * } @@ -113,7 +113,7 @@ * @param b Blue value (passed by reference) * @param c Clear value (all wavelengths - essentially shade) (passed by reference) */ - void getColor(uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *c); + void getColor(uint16_t &r, uint16_t &g, uint16_t &b, uint16_t &c); /** Debug function... probably not useful unless youre debugging your i2c line *