I2C problem with BH1750
Posted: Wed Jun 18, 2025 9:58 am
Hi.
I'm developing, with wroom32, a simple weather station.
I'm using esp-idf 5.4.2
I find that using i2c.c [with attached i2cdev_OK] everything works, while using i2c_master.c [with attached i2cdev_NO_OK] trasmission fails. In particular I find this:
Found BH1750 device at 0x23
[0;31mE (649) i2c.master: I2C transaction unexpected nack detected[0m
[0;31mE (649) i2c.master: s_i2c_synchronous_transaction(918): I2C transaction failed[0m
[0;31mE (652) i2c.master: i2c_master_multi_buffer_transmit(1180): I2C transaction failed[0m
It seems a problem of i2c_master.
Can you help me?
I'm developing, with wroom32, a simple weather station.
I'm using esp-idf 5.4.2
I find that using i2c.c [with attached i2cdev_OK] everything works, while using i2c_master.c [with attached i2cdev_NO_OK] trasmission fails. In particular I find this:
Found BH1750 device at 0x23
[0;31mE (649) i2c.master: I2C transaction unexpected nack detected[0m
[0;31mE (649) i2c.master: s_i2c_synchronous_transaction(918): I2C transaction failed[0m
[0;31mE (652) i2c.master: i2c_master_multi_buffer_transmit(1180): I2C transaction failed[0m
It seems a problem of i2c_master.
Can you help me?