VEML6070: Adding separate i2c contexts for separate addresses

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Abhishek Malik
2017-05-18 13:55:21 -07:00
parent c70f378f72
commit b4bc15201b
9 changed files with 56 additions and 148 deletions

View File

@ -44,7 +44,7 @@ int main ()
//! [Interesting]
// Instantiate an VEML6070 sensor on i2c bus 0
upm::VEML6070* veml = new upm::VEML6070(0, VEML6070_CTRL_REG);
upm::VEML6070* veml = new upm::VEML6070(0);
while (shouldRun) {
cout << "Retrieved UV value: " << veml->getUVIntensity() << endl;
sleep(1);