I would like to give you some news:
with this code i could receive some strange value:
#include <Wire.h>
void setup(){
Serial.begin(9600);
/*Start communication */
Wire.begin();
}
void getdata(byte *a, byte *b, byte *c){
Wire.beginTransmission(0x60);
Wire.write(0x01); // Data_PMSB_reg address
Wire.endTransmission();
// now get the data from the sensor
Wire.requestFrom(0x60, 3); // "please send me the contents of your first three registers"
while(Wire.available()==0){
*a = Wire.read(); // first received byte stored here
*b = Wire.read(); // second received byte stored here
*c = Wire.read(); // third received byte stored here
}}
void loop(){
Serial.println("bli"); //print aa for example
// Put sensor as standby
Wire.beginTransmission(0x60); //0x60 is sensor address
Wire.write(0x26); //ctrl_reg
Wire.write(0x00); //reset_reg
Wire.endTransmission();
delay(10);
// start sensor as Barometer Active
Wire.beginTransmission(0x60);
Wire.write(0x26);
Wire.write(0x01); //start sensor as barometer
Wire.endTransmission();
delay(10);
byte aa,bb,cc;
getdata(&aa,&bb,&cc);
Serial.println(aa); //print aa for example
Serial.println(bb); //print bb for example
Serial.println(cc); //print cc for example
Serial.println("bla"); //print aa for example
delay(500);
}
("bli" and "bla" are test strings)
Value obtained by mine are "222 0 222" (E0 0 E0), and they never change even i change the barometer pressure. How can You explain this?