TMP006: Adding very basic support for TMP007

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Abhishek Malik
2017-05-08 10:30:43 -07:00
parent 7688e5f230
commit 6c383dbd42
3 changed files with 55 additions and 8 deletions

View File

@ -44,8 +44,13 @@ int main(int argc, char **argv)
//! [Interesting]
std::cout << "Initializing test-application..." << std::endl;
// please make sure that you have the right i2c address for your device
// the correct range of addresses is 0x40 - 0x47
// Instantiate an TMP006 instance on bus 1
upm::TMP006 *mySensor = new upm::TMP006(1);
upm::TMP006 *mySensor = new upm::TMP006(1, TMP006_CONFIG_CR_DEF, TMP006_I2C_ADDRESS);
// you can also get basic tmp007 functionality by initializing it as follows
//upm::TMP006 *mySensor = new upm::TMP006(1, TMP006_CONFIG_CR_DEF, TMP007_I2C_ADDRESS);
// activate periodic measurements
mySensor->setActive();