problem BMP085

29 Mar 2012
  1. include "mbed.h"
  2. include "BMP085.h"
  3. include "string.h"

DigitalOut led1(LED1);DigitalOut led2(LED2);DigitalOut led3(LED3);DigitalOut led4(LED4); Serial pc(USBTX,USBRX);

I2C i2c(p28,p27); BMP085 bmp(p28,p27,BMP085_oss8);

void read_pressure() { float temp; float pression;

bmp.update();

temp=bmp.get_temperature(); pression=bmp.get_pressure();

pc.printf("temperature = %f\r",temp); pc.printf("pression = %f\r",pression); wait(1); }

int main() { pc.printf("Debut\n\r"); while(1) { led1=1; wait(0.5); read_pressure(); led1=0; wait(0.5); } }

Hello, this is my code. I recept values, but temp and pression are constants. If you know why please help me, I need help quickly !