This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2253: Need help About BMP180 sensor !

Part Number: MSP430G2253
Other Parts Discussed in Thread: ENERGIA, MSP430G2553

Im have a project about get PRESSURE/TEMPERATURE/ALTITUDE with BMP180 , but when i using example of Library of BMP180 with Energia 0101E0017 , it not work . 

SDA -> P1.7

SCL ->P1.6

My code : 

#include <Wire.h>          // required by BMP085 library
#include <BMP085_t.h>      // import BMP085 template library

BMP085<> PSensor;         // instantiate sensor, 0 = low precision pressure reading

void setup()
{
  Serial.begin(9600);      // initialize serial, used to display readings in Serial Monitor
  Wire.begin();            // initialize I2C that connects to sensor
  PSensor.begin();         // initalize pressure sensor
}

void loop()
{
  PSensor.refresh();                    // read current sensor data
  PSensor.calculate();                  // run calculations for temperature and pressure
  Serial.print("Temperature: ");         
  Serial.print(PSensor.temperature/10);  // display temperature in Celsius
  Serial.print(".");
  Serial.print(PSensor.temperature%10);  // display temperature in Celsius
  Serial.println("C");
  Serial.print("Pressure:    ");
  Serial.print((PSensor.pressure+50)/100);   // display pressure in hPa
  Serial.println("hPa");

  delay(5000);                          // wait a while before next loop
}

Result : 

 




 

  • I don't see any I2C pullups in the photo. Are they on your target (BMP180) board?

    Also, there is what appears to be a jumper block jammed under MCU pins 11/12. Is that doing anything?
  • Hi Phuc,

    What's the BMP180 board? Do you have the document for this?

    It seems the BMP180 communicates with MSP430 MCU via I2C interface, right? If yes, I may give you below suggestions for debugging.
    1. connect the GND between the two boards. You should always make sure the two boards have common ground.
    2. scope the signals on SDA and SCL lines. You should make sure the I2C communication works well before going ahead to higher level application debugging.
  • Hi 

    Bruce McKenney47378 



    My BMP180 module , it have available I2C pullups in there , and that "a jumper block jammed" not effect :D ...

  • Hi Wei.Jetim Zhao ! .

    Im try it with arduino and it work but when i using with MSP430G2553 it didnt . So sad

    1 . im sure the two boards have common ground.
  • 1) Is this really a G2253? If I zoom into your photo (and squint) it almost looks like "553" at the end of the second line, and the G2553 should be fine. I ask this since I've seen comments that Energia doesn't run well on "small" (<4KB?) MCUs, though I would expect the symptom to be different.

    2) Are you using the "astuder" library? There's a discussion over at 43oh.com

    forum.43oh.com/.../

    which seems to describe your symptom on Page 2. The author apparently fixed that version conflict 2 years ago, but maybe there's a similar thing now? In any case, you might get better/quicker answers by asking in that discussion. (I don't know much about Energia, and I don't have a BMP180.)

  • Tks for your help Bruce !

    I sloved my problem by using Energia 0101E0016 , it work well and sorry about my mistake about version of board :D

**Attention** This is a public forum