Jump to content
43oh

How can I interface Bosch BME280 shuttleboard with MSP432?


Recommended Posts

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

Link to post
Share on other sites

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.

 

Link to post
Share on other sites

@@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 *F
1003.85 mb    31.75 %        25.60 *C    78.08 *F
1003.83 mb    31.65 %        25.61 *C    78.10 *F
1003.86 mb    31.64 %        25.62 *C    78.12 *F
1003.83 mb    31.62 %        25.63 *C    78.13 *F
1003.83 mb    31.62 %        25.64 *C    78.15 *F
1003.84 mb    31.62 %        25.65 *C    78.17 *F
1003.85 mb    31.59 %        25.64 *C    78.15 *F
1003.82 mb    31.55 %        25.65 *C    78.17 *F
1003.81 mb    31.52 %        25.65 *C    78.17 *F
1003.83 mb    31.47 %        25.65 *C    78.17 *F
1003.82 mb    31.45 %        25.66 *C    78.19 *F
1003.78 mb    31.79 %        25.67 *C    78.21 *F
1003.83 mb    32.15 %        25.69 *C    78.24 *F
1003.84 mb    31.98 %        25.69 *C    78.24 *F
1003.85 mb    31.85 %        25.69 *C    78.24 *F

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...