library for the motor driver
Dependents: 4180_final_project
Fork of libTCS34725 by
Diff: TCS34725.h
- Revision:
- 1:06c9bbbdb8b0
- Parent:
- 0:4796574af790
- Child:
- 2:cc2c0831a763
--- a/TCS34725.h Thu Jan 19 18:53:40 2017 +0000 +++ b/TCS34725.h Tue Jan 24 23:25:54 2017 +0000 @@ -1,4 +1,5 @@ // TCS34725 RGB Color I2C Sensor breakout library for F030R8 Nucleo board +#include "mbed.h" //These pins should be the only piece specific to the F030R8 #define SCL PB_8 @@ -6,13 +7,14 @@ //I2C Address -#define SENSOR_ADDR 0x29 +#define SENSOR_ADDR 0x52 //Important Registers #define TCS34725_ENABLE (0x00) //for turning on the device #define TCS34725_ATIME (0x01) //for integration time #define TCS34725_CONTROL (0x0F) //for setting the gain +#define TCS34725_ID (0x12) #define TCS34725_CDATAL (0x14) /* Clear channel data */ #define TCS34725_CDATAH (0x15) #define TCS34725_RDATAL (0x16) /* Red channel data */ @@ -41,6 +43,6 @@ uint8_t i2cRead8(uint8_t addr, char reg); uint16_t i2cRead16(uint8_t addr, char reg); -TCS34725_init(char intTime, char gain); -TCS34725_config(char intTime, char gain); -TCS34725_getColor(uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *c); \ No newline at end of file +bool TCS34725_init(char intTime, char gain); +void TCS34725_config(char intTime, char gain); +void TCS34725_getColor(uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *c); \ No newline at end of file