7#ifndef _MiniR4ColorSensorExt_H_
8#define _MiniR4ColorSensorExt_H_
14# define ADDR_PCA954X 0x70
17#define MatrixColor_ADDR 0x22
39 typedef enum __ColorRegType
55 uint8_t setting = 0x0F;
56 uint8_t i2cReadData(ColorRegType reg);
58 void i2cWriteData(ColorRegType reg, uint8_t data);
85 void setLight(
bool state,
bool mode, uint8_t pwm);
enum __ColorType ColorType
Class for interacting with a color sensor.
uint8_t getColorNumber()
Gets the number of colors supported by the sensor. Number of color as follow as below: 0:Black,...
bool begin()
Initializes the color sensor.
uint8_t getGrayscale()
Gets the grayscale value from the sensor.
uint8_t getColor(ColorType color)
Gets the value of a specific color from the sensor.
void setLight(bool state, bool mode, uint8_t pwm)
Sets the light state and mode for the sensor.
void setGamma(bool state)
Sets the gamma correction state for the sensor.