Ok, I'm going to tell you all the things I've been finding until now.
First of all, its website:
I talked with their engineers and they said me that we have to use address 0x78 (7 bit) plus one bit for read (1) or write (0).
I'm working with a waspmote from Libelium, and I'm using their libraries, but when I tried to use the 'requestFrom' or 'endTransmission' instructions the system halts.
Asking for this to the Libelium staff, they told me that i have to switch on the RTC (it uses the I2C bus too), but when I do that, my system halts too when it arrives to the 'RTC.begin' instruction.
Also I don't know how to read the humidity correctly.
After a lot of test, I have a code that seems to work sometimes.
uint8_t ADDRESS = B1111000; //0x78;
uint8_t ADDRESS_2 = B11110000; //0xF0;
uint8_t ADDRESS_3 = B11110001; //0xF1;
uint16_t MASK = B01111111;
uint8_t REG = 0x00;
uint8_t quantity=4;
uint8_t info[4];
uint16_t temperature=0;
uint16_t humidity=0;
int i=0;
void setup()
{
USB.begin();
RTC.begin();
pinMode(SENS_PW_5V,OUTPUT);
PWR.setSensorPower(SENS_5V,SENS_ON);
if( !Wire.I2C_ON ) Wire.begin();
}
void loop()
{
USB.println("\tHumidity & Temperature:\n");
// Wire.requestFrom(ADDRESS_3, quantity);
Wire.beginTransmission(ADDRESS_3);
for (i=0;i<quantity;i++)
{
if (Wire.available())
{
info*=Wire.receive();*
- delayMicroseconds(0.65);*
- }*
- }*
// Wire.endTransmission();
- for(i=0;i<quantity;i++)*
- { *
- if (i==0 || i==2)*
- {*
info = info & MASK;
* }*
* }*
* humidity = (info[0] << 8) + info[1];*
* USB.print("Humidity: ");*
* USB.println(humidity,DEC);*
* temperature = (info[2] << 8) + info[3];*
* USB.print("Temperature: ");*
* USB.println(temperature,DEC);*
* delay(2000);*
}