Skip to content

Commit

Permalink
SHT4x often gives "i2cdev: Could not read from device [0x44 at 0]" er…
Browse files Browse the repository at this point in the history
…ror… … on measurement #598 fix
  • Loading branch information
MRusinov committed Feb 4, 2024
1 parent 8c1695b commit 99ab502
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/sht4x/sht4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ static esp_err_t exec_cmd(sht4x_t *dev, uint8_t cmd, size_t delay_ticks, sht4x_r
{
I2C_DEV_TAKE_MUTEX(&dev->i2c_dev);
I2C_DEV_CHECK(&dev->i2c_dev, send_cmd_nolock(dev, cmd));
if (delay_ticks)
vTaskDelay(delay_ticks);
vTaskDelay(delay_ticks + 1);
I2C_DEV_CHECK(&dev->i2c_dev, read_res_nolock(dev, res));
I2C_DEV_GIVE_MUTEX(&dev->i2c_dev);

Expand Down

0 comments on commit 99ab502

Please sign in to comment.