This commit is contained in:
Alexander 2024-07-08 22:50:42 -04:00
parent e77a603ac3
commit a0b0483796
2 changed files with 3 additions and 0 deletions

View File

@ -138,6 +138,7 @@ static esp_err_t i2c_driver_initialize(void)
void app_main(void)
{
// CONNECT TO BMP280
//
ESP_ERROR_CHECK(i2c_driver_initialize());
i2c_driver_install(I2C_NUM_0, I2C_MODE_MASTER, I2C_MASTER_RX_BUF_DISABLE, I2C_MASTER_TX_BUF_DISABLE, 0);
uint8_t address = 0x76;

View File

@ -86,6 +86,8 @@ i2c_master_write_read_device(I2C_MASTER_NUM, 0x76, &reg_addr, 1, data, len, I2C_
<img alt="BME-/BMP-280 Memory Map" src="https://github.com/alexandrebobkov/ESP-Nodes/blob/main/assets/BME280_BMP280_Registers.png" width="90%"/>
<img alt="BME-/BMP-280 I<sup>2</sup>C Read & Write" src="https://github.com/alexandrebobkov/ESP-Nodes/blob/main/assets/bme280_i2c_read-write.png" width="100%"/>
[^2]: https://www.bosch-sensortec.com/products/environmental-sensors/humidity-sensors-bme280/
[^3]: https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp280/
[^4]: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf