We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Got my i2c bus working, but now facing issues with HTU21D

  • Hi,

    I'm attempting to interface with an HTU21D temperature/humidity sensor.

    I've written a quick shell script that writes the start command for humidity to the device and then reads back a byte using i2cget. The byte seems valid as if I increase the humidity with my finger, the values increase and then drop as my finger goes away. All good so far.

    However, I need to read a word rather than a byte. Using "0x00" as the register and "w" for word with i2cget yields a read error. Also, I'm not really reading a register per se -- these are bytes "on the wire".

    Does anyone have any recommendations on how to get i2cget to work with this device? Or simple suggestions on doing this in Python etc.

    Thanks in advance.

  • Actually, I'd take some help around writing a small C program that:

    • Writes a single byte command to the I2C bus
    • Reads three bytes back off of the bus

    I will have a stab at it myself in the meantime šŸ™‚

Log in to reply

Looks like your connection to Community was lost, please wait while we try to reconnect.