VEML7700 High Accuracy Ambient Light Sensor with I2C Interface
Dependents: testVEML7700 ROS_VEML7700_test ROSSerial_MultipleSensors
VEML7700.h
- Committer:
- Rhyme
- Date:
- 2017-03-30
- Revision:
- 0:6dabb0ddf3d9
- Child:
- 2:63196ef2a2ed
File content as of revision 0:6dabb0ddf3d9:
#ifndef _VEML7700_H_ #define _VEML7700_H_ /** * Vishay VEML7700 * High Accuracy Ambient Light Sensor with I2C Interface */ /* * @code * @endcode */ class VEML7700 { public: /** * VEML7700 constructor * * @param sda SDA pin * @param sdl SCL pin * @param addr addr of the I2C peripheral */ VEML7700(PinName sda, PinName scl, int addr); /** * VEML7700 destructor */ ~VEML7700(); void setALSConf(uint16_t conf) ; void setALS_WH(uint16_t wh) ; void setALS_WL(uint16_t wl) ; void setPowerSaving(uint16_t ps) ; uint16_t getALS(void) ; uint16_t getWHITE(void) ; uint16_t getALS_INT(void) ; private: I2C m_i2c; int m_addr; void readRegs(int addr, uint8_t * data, int len); void writeRegs(uint8_t * data, int len); }; #endif /* _VEML6030_H_ */