I2C - Honewell HIH-6130/6131 Humidity/Temperature Sensor

Dear All,
I am trying to interfacing with the sensor from ChipworkX development board.
As per sensor protocol document ([url]Safety and Productivity Solutions | Honeywell), the measure request command simply expects a write command with no input data.
I am not sure how to create I2CWriteTransaction with no input data using I2CDevice.CreateWriteTransaction as the function expects byte[] as an argument. I have tried by passing empty buffer as well as null with no success.

Any help would be highly appreciated.


This should help http://wiki.tinyclr.com/index.php?title=I2C_-_EEPROM

Thanks Gus for the quick response. I have successfully accessed I2C devices before and all of them require at least one byte message passed to CreateWriteTransaction.

I am stumped on this particular one as the Write transaction doesn’t expect any input data to be passed. My question remains, how can I construct I2CWriteTransaction with no input data?


I2CDevice.CreateWriteTransaction(new byte[]);

? But not tested, though :hand:

I2CDevice.CreateWriteTransaction(new byte[]);

would give a compiler error as it is missing array size.
I have tried following though

I2CDevice.CreateWriteTransaction(new byte[]{});

which gives System.InvalidOperationException exception when I execute the transaction and


which throws System.ArgumentNullException exception.

The I2C in NET MF is not too flexible and sometime you may hit a wall… I had a similar issue where i had to send ack to every byte i receive and standard lib only sends stop after enough bytes were received. I solved this using software version of I2C:


i suggest you try it to make sure ther sensor and wires are ok

The sensor wires are fine as I can issue Read request and get the data. The issue is with the Write.
I would look at software I2C as you suggested.
Thanks for your response.

This could be a NET FM issue than sensor issue, as per the following link
[url]http://www.phanderson.com/arduino/hih6130.html[/url] it is not an issue on Arduino platform.
or may be I am missing something.

Agree, NET MF I2C library is limited. I mentioned the wires as you never know :wink: i suspect the software i2c will do the trick. There is also a software i2c implementation included in GHI SDK but it didn’t solve my issue

I have tried with Software I2C, still no success with this sensor. I am suspecting that it is with clock speed as spec sheet says minimum 100kHZ.
Software I2C worked with some other type of I2C device though.

I know this is dumb, but have you tried this?

I2CDevice.CreateWriteTransaction(new byte[0]);

I don’t have a device with me to test and the emulator isn’t happy with any write size…

Hi Errol,

I have tried this

I2CDevice.CreateWriteTransaction(new byte[]{ });

which is equivalent to yours

I2CDevice.CreateWriteTransaction(new byte[0]); 

Thanks for the suggestion though.

Actually, we have decided to use OneWire based sensors as we need to connect multiple sensors to the same system and I2C based modules require change of default address to function properly.