Skip to content

I2C not communicating with slave device #11

Closed
@bbx10

Description

@bbx10

I tried an HTU21DF (temperature and humidity) and a BMP180 (barometric pressure) but the drivers do not get past the first I2C transmission. Both sensors work on an ESP8266.

The first thing the HTU21DF driver does is send a RESET command like this. Writing to this register forces the sensor to factory defaults.

  Wire.beginTransmission(HTU21DF_I2CADDR);  // addr 0x40
  Wire.write(HTU21DF_RESET);                // 0xFE
  Wire.endTransmission();

This is what it looks like on an Uno.

uno_htu21df_small

Here is what happens on my ESP32. If other people have I2C working, the problem must be in my setup or ESP32.

esp32_htu21df_small

Since there is a NAK, the driver aborts the rest of the transmission.

I am trying various changes to esp32-hal-i2c.c but have not made any progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions