mlx90614: set i2c bus speed to 100 kHz on init to match sensor specs

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Tudor Panu 2016-07-14 14:13:58 -07:00
parent baec9966f0
commit e7394217b1

View File

@ -42,6 +42,12 @@ MLX90614::MLX90614 (int bus, int devAddr) : m_i2Ctx(bus) {
throw std::invalid_argument(std::string(__FUNCTION__) +
": address() failed");
}
if ((ret = m_i2Ctx.frequency(mraa::I2C_STD)) != mraa::SUCCESS ) {
throw std::invalid_argument(std::string(__FUNCTION__) +
": I2c.frequency(I2C_STD) failed");
return;
}
}
float