|
HiTechnic Color Sensor driver. More...
#include "common.h"
#include "common-light.h"
Go to the source code of this file.
Defines | |
#define | HTCS_I2C_ADDR 0x02 |
#define | HTCS_CMD_REG 0x41 |
#define | HTCS_OFFSET 0x42 |
#define | HTCS_COLNUM_REG 0x00 |
#define | HTCS_RED_REG 0x01 |
#define | HTCS_GREEN_REG 0x02 |
#define | HTCS_BLUE_REG 0x03 |
#define | HTCS_RED_RAW_REG 0x04 |
#define | HTCS_GREEN_RAW_REG 0x05 |
#define | HTCS_BLUE_RAW_REG 0x06 |
#define | HTSC_COL_INDEX_REG 0x07 |
#define | HTSC_RED_NORM_REG 0x08 |
#define | HTSC_GREEN_NORM_REG 0x09 |
#define | HTSC_BLUE_NORM_REG 0x0A |
#define | HTCS_CAL_WHITE 0x43 |
Functions | |
int | HTCSreadColor (tSensors link) |
bool | HTCSreadRGB (tSensors link, int &red, int &green, int &blue) |
bool | HTCSreadNormRGB (tSensors link, int &red, int &green, int &blue) |
bool | HTCSreadRawRGB (tSensors link, int &red, int &green, int &blue) |
bool | HTCScalWhite (tSensors link) |
int | HTCSreadColor (tMUXSensor muxsensor) |
bool | HTCSreadRGB (tMUXSensor muxsensor, int &red, int &green, int &blue) |
bool | HTCSreadHSV (tSensors link, float &hue, float &saturation, float &value) |
bool | HTCSreadHSV (tMUXSensor muxsensor, float &hue, float &saturation, float &value) |
int | HTCSreadColorIndex (tSensors link) |
Variables | |
tConfigParams | HTCS_config = {HTSMUX_CHAN_I2C, 4, 0x02, 0x42} |
tByteArray | HTCS_I2CRequest |
tByteArray | HTCS_I2CReply |
HiTechnic Color Sensor driver.
hitechnic-colour-v1.h provides an API for the HiTechnic Color Sensor driver.
Changelog:
Credits:
License: You may use this code as you wish, provided you give credit where its due.
THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.
Definition in file hitechnic-colour-v1.h.