Towhid 2 Posted November 26, 2015 Share Posted November 26, 2015 HelloI have a msp432 launchpad and I have to interface it with Bosch BME 280 shuttleboard, I am not sure how to do it...ca anyone help please?? I have attached the shuttleboard flyer here... Quote Link to post Share on other sites
yosh 121 Posted November 26, 2015 Share Posted November 26, 2015 Hi have a look on datasheet pages 37..39 for the pinout (I2C or SPI) and here https://ae-bst.resource.bosch.com/media/products/shuttleboards/BMP280_Shuttleboard_Flyer.pdf for the corresponding pins on the "shuttel board" MSP432 Launchpad pin map here: http://energia.nu/wordpress/wp-content/uploads/2015/03/MSP432-LaunchPad-%E2%80%94-Pins-Maps.jpg Arduino example + code here (if you plan to use Energia): http://www.seeedstudio.com/recipe/257-bosch-bme280-1-chip-temp-humidity-pressure.html(<- you don't need the level shifter!) additional information, sketch, etc. here: http://cactus.io/hookups/sensors/barometric/bme280/hookup-arduino-to-bme280-barometric-pressure-sensor Best wishes energia, Towhid and reaper7 3 Quote Link to post Share on other sites
Towhid 2 Posted November 30, 2015 Author Share Posted November 30, 2015 thank you YoshI have tried the code from the link you have provided ..i tried it on Energia but it says error compiling...any suggestion ? Quote Link to post Share on other sites
yosh 121 Posted November 30, 2015 Share Posted November 30, 2015 Hi based on the I2C example code / files from HERE Library: http://static.cactus.io/downloads/library/bme280/cactus_io_BME280_I2C.zip Lib must be copied into ...\Energia\energia-0101E0016\hardware\msp432\libraries\cactus_io_BME280_I2C Sketch: #include <Wire.h> #include "cactus_io_BME280_I2C.h" // Create BME280 object BME280_I2C bme; // I2C void setup() { Serial.begin(9600); Serial.println("Bosch BME280 Pressure - Humidity - Temp Sensor | cactus.io"); if (!bme.begin()) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); } Serial.println("Pressure\tHumdity\t\tTemp\ttTemp"); } void loop() { Serial.print(bme.getPressure() / 100.0F); Serial.print(" mb\t"); // Pressure in millibars Serial.print(bme.getHumidity()); Serial.print(" %\t\t"); Serial.print(bme.getTemperature_C()); Serial.print(" *C\t"); Serial.print(bme.getTemperature_F()); Serial.println(" *F"); // Add a 2 second delay. delay(2000); //just here to slow down the output. } Binary sketch size: 35511 bytes (of a 262144 byte maximum) >>>> Done <<<< At least it compiles without errors ... can't test it further since I don't have the BME280. energia and reaper7 2 Quote Link to post Share on other sites
reaper7 67 Posted December 1, 2015 Share Posted December 1, 2015 nice i useful, I got my bme yesterday, so first test today yosh 1 Quote Link to post Share on other sites
reaper7 67 Posted December 1, 2015 Share Posted December 1, 2015 @@yosh - Your code works OK with only one mod because my module have "hard" set address 0x76, so I change bme.begin() to bme.begin(0x76) 1003.83 mb 31.79 % 25.61 *C 78.10 *F1003.85 mb 31.75 % 25.60 *C 78.08 *F1003.83 mb 31.65 % 25.61 *C 78.10 *F1003.86 mb 31.64 % 25.62 *C 78.12 *F1003.83 mb 31.62 % 25.63 *C 78.13 *F1003.83 mb 31.62 % 25.64 *C 78.15 *F1003.84 mb 31.62 % 25.65 *C 78.17 *F1003.85 mb 31.59 % 25.64 *C 78.15 *F1003.82 mb 31.55 % 25.65 *C 78.17 *F1003.81 mb 31.52 % 25.65 *C 78.17 *F1003.83 mb 31.47 % 25.65 *C 78.17 *F1003.82 mb 31.45 % 25.66 *C 78.19 *F1003.78 mb 31.79 % 25.67 *C 78.21 *F1003.83 mb 32.15 % 25.69 *C 78.24 *F1003.84 mb 31.98 % 25.69 *C 78.24 *F1003.85 mb 31.85 % 25.69 *C 78.24 *F yosh 1 Quote Link to post Share on other sites
yosh 121 Posted December 1, 2015 Share Posted December 1, 2015 Thanks for the results @@reaper7 but credits for code and sketch go to someone else ;-) but good to know it is working as requested by the thread starter ... reaper7 1 Quote Link to post Share on other sites
Towhid 2 Posted December 3, 2015 Author Share Posted December 3, 2015 i havent been able to run the code ...do I also need the sketech file ?..and where should i save it ?? Quote Link to post Share on other sites
yosh 121 Posted December 3, 2015 Share Posted December 3, 2015 The links and code provided are ment to be used in Energia. Place the library files as mentioned before and copy the sketch-code into Energias coding window ... reaper7 1 Quote Link to post Share on other sites
Towhid 2 Posted December 14, 2015 Author Share Posted December 14, 2015 is it possible to show the output of this sensor throug sharp lcd boosterpack ? 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.