Dezibot 4
Loading...
Searching...
No Matches
ColorDetection.h
Go to the documentation of this file.
1
12#ifndef ColorDetection_h
13#define ColorDetection_h
14#include <stdint.h>
15#include <Wire.h>
16#include <Arduino.h>
17//Definitions for I2c
18#define I2C_MASTER_SCL_IO 2
19#define I2C_MASTER_SDA_IO 1
21//Chipadress of the VEML6040
22#define VEML_ADDR 0x10
24//CMDCodes for communicate with the VEML6040
25#define CMD_CONFIG 0x00
26#define REG_RED 0x08
27#define REG_GREEN 0x09
28#define REG_BLUE 0x0A
29#define REG_WHITE 0x0B
30
31
40
45
51
52
60public:
61 void begin(void);
62 void configure(VEML_CONFIG config);
63 uint16_t getColorValue(color color);
64protected:
65 uint16_t readDoubleRegister(uint8_t regAddr);
66 void writeDoubleRegister(uint8_t regAddr, uint16_t data);
67};
68#endif //ColorDetection_h
color
@ VEML_GREEN
@ VEML_RED
@ VEML_BLUE
@ VEML_WHITE
duration
@ MS320
@ MS160
@ MS1280
@ MS40
@ MS80
@ MS640
vemlMode
@ MANUAL
@ AUTO
uint16_t getColorValue(color color)
uint16_t readDoubleRegister(uint8_t regAddr)
void configure(VEML_CONFIG config)
void writeDoubleRegister(uint8_t regAddr, uint16_t data)
duration exposureTime
vemlMode mode