denzel 0 Posted April 18, 2017 Share Posted April 18, 2017 i'have hooked up a bme280 sensor to msp430. I have tried serveral libraries, https://github.com/finitespace/BME280/ and https://github.com/adafruit/Adafruit_BME280_Library. Though am running into the same error. error: 'NAN' has not been declared error: 'NAN' has not been declared What could be the issue? Regards. Quote Link to post Share on other sites
aegotheles 2 Posted April 18, 2017 Share Posted April 18, 2017 What MSP430 are you using? SPI or I2C (just saw you tagged it I2C)? If you look in Adafrauit's Adafruit_BME280.cpp file under lines 374, 403, and 437 - there is the following 'if' statement, int32_t adc_T = read24(BME280_REGISTER_TEMPDATA); if (adc_T == 0x800000) // value in case temp measurement was disabled return NAN; NAN simply refers to 'not a number', and indicates typically something went wrong when reading the sensor. Adafruit's example was originally written for Arduino, so you'll have to use something similar for NAN in Energia I assume. Quote Link to post Share on other sites
Rei Vilo 695 Posted April 18, 2017 Share Posted April 18, 2017 Have a look at SensorsWeather_Library, available through the Library Manager on Energia. Quote The Weather Sensors Library supports the TMP007 infra-red thermometer, OPT3001 light sensor, and BME280 thermometer, barometer and hydrometer of the Sensors BoosterPack. Quote Link to post Share on other sites
B@tto 51 Posted April 19, 2017 Share Posted April 19, 2017 In addition, I succesfully used this one : http://cactus.io/hookups/sensors/barometric/bme280/hookup-arduino-to-bme280-barometric-pressure-sensor I just made some modifications to get sensor working in low power mode. Quote Link to post Share on other sites
Abdul400 0 Posted August 17, 2020 Share Posted August 17, 2020 Hello all, I am working to CC3200 launchpad and i want to interface bme680 sensor with CC3200 using Energia IDE. I am searching for library of this sensor but couldn't fine one. Can anyone help me regarding this? I tested this sensor with arduino uno and esp32 and adafruit_bm680 library works fine. but i tried to run it on energia and it didn't worked. Please guide me regarding this thanks. Quote Link to post Share on other sites
Rei Vilo 695 Posted August 18, 2020 Share Posted August 18, 2020 @Abdul400 There is no need to post the same question multiple times, as already at Please refer to: Netiquette for Newbies Porting an Arduino library to Energia Abdul400 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.