Arduino library for Silabs Si7005

Hi guys,

I have made a library + example source for the Silabs Si7005 temperature/humidity sensor.
It can be found here: GitHub - jjalling/Arduino-Si7005: Arduino library for the Silabs Si7005 temperature/humidity sensor

I hope it will be useful for someone.
Please don't hesitate to contact me in case of questions/bugs/comments.

BR Jonas

thanks for the library, it is very easy to use

thanks alot

some remarks:

  1. how is the chip connected, it is an I2C device but your code has a CS (chip select) handshake?

  2. using uint8_t for pins and registers saves a few bytes

e.g. Si7005::Si7005( uint8_t pin )
 return (( deviceID & ID_SAMPLE ) == ID_SI7005 );  is shorter

why not

 return (( deviceID & ID_SI7005) == ID_SI7005 );
  while ( Wire.available( ) < 2 )                                                        // Wait for data
  {;;}  << a block with empty statements?

can be written as

  while ( Wire.available( ) < 2 ) {}

instead of float division in getTemp/hum you can do a multiply with the reciproke (faster)

_last_humidity is nowhere used.

in detectSensor() you should check the return value of Wire.endtransmission(),
if the device isnot on the bus you will get a non zero value.

 Wire.beginTransmission( SI7005_ADR );
  Wire.write( REG_ID );                                                                                // Select the ID register
  Wire.endTransmission( false );                                                        // We don't want to release the bus - this is important!

Hi, Jonas,

Is it possible to change the slave address of SI7005? I did not find any clues in the datasheet.


please post the link to the datasheet (most people here do not have it)

As far as I can see you cannot change the address of the chip.

BUt there is a CS pin to enable/disable the chip

15 CS I Chip Select—Active Low Signal [PAGE 30]

so you might use that to disable the chips you do not want to read.