From b943cd9bfe27acdfb0d28edbb69525d004197238 Mon Sep 17 00:00:00 2001 From: Alexandre B Date: Mon, 8 Jul 2024 18:09:56 -0400 Subject: [PATCH] . --- ESP32-IDF_BMP280/main/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ESP32-IDF_BMP280/main/main.c b/ESP32-IDF_BMP280/main/main.c index 2b9df4bb1..5db867a07 100644 --- a/ESP32-IDF_BMP280/main/main.c +++ b/ESP32-IDF_BMP280/main/main.c @@ -105,13 +105,13 @@ static esp_err_t i2c_master_init(void) void app_main(void) { - uint8_t data[2]; + /*uint8_t data[2]; uint8_t raw_temp[BME280_TEMPERATURE_DATA_SIZE] = {0,0,0}; ESP_ERROR_CHECK(i2c_master_init()); ESP_LOGI(TAG, "I2C initialized successfully"); - /* Read the MPU9250 WHO_AM_I register, on power up the register should have the value 0x71 */ + // Read the MPU9250 WHO_AM_I register, on power up the register should have the value 0x71 int read = 0; read = i2c_master_read_from_device(0, 0x76, data, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS); @@ -125,8 +125,8 @@ void app_main(void) ESP_LOGI(TAG, "I2C initialized successfully"); read = bme280_read_raw_temperature(0x76, raw_temp); ESP_LOGI(TAG, "Raw Temperature: %X", raw_temp[0]); - /* Demonstrate writing by reseting the MPU9250 */ + // Demonstrate writing by reseting the MPU9250 //ESP_ERROR_CHECK(mpu9250_register_write_byte(MPU9250_PWR_MGMT_1_REG_ADDR, 1 << MPU9250_RESET_BIT)); ESP_ERROR_CHECK(i2c_driver_delete(I2C_MASTER_NUM)); - ESP_LOGI(TAG, "I2C de-initialized successfully"); + ESP_LOGI(TAG, "I2C de-initialized successfully");*/ }