diff --git a/src/mlx90614/mlx90614.cxx b/src/mlx90614/mlx90614.cxx index 5afaac34..ea174a27 100644 --- a/src/mlx90614/mlx90614.cxx +++ b/src/mlx90614/mlx90614.cxx @@ -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