How can I resolve I2C transfer failure on AVR128DA48 with BMP280 sensor in Zephyr OS?
Hello guys, I'm working on a real-time pressure monitoring system for industrial automation using the AVR128DA48 microcontroller and Zephyr OS. I'm interfacing a BMP280 pressure sensor via I2C, but I'm encountering an error during communication. The I2C wiring and connections between the BMP280 sensor and AVR128DA48 are verified to be ok, I double-checked the BMP280 sensor's I2C address (0x76), and updated the device tree for correct I2C configuration in Zephyr OS. yet still having this issue
I2C transfer failed with error code -EIO
making it unable to establish successful I2C communication with the BMP280 sensor. who has an idea of how I can reslove it?
this is my code:
I'm expected to print pressure values in the console if successful.Solution:Jump to solution
hey buddy @Dtynin try updating I2C device binding, with the following supposedly
#define I2C_DEV DT_LABEL(DT_NODELABEL(i2c0))
2 Replies