This commit is contained in:
Alexandre B 2024-07-17 12:01:08 -04:00
parent bba9cde9f9
commit 70f13de7d5
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
#define __LM75_H__
#define LM75_CHIP_ID (0x07)
#define LM75_I2C_ADDRESS1 (0x49) // BME280 Data sheet p. 32
#define LM75_I2C_ADDRESS1 (0x49)
#define BME280_I2C_ADDRESS2 (0x49)
#define BME280_TEMPERATURE_REGISTER (0x00)

View File

@ -29,7 +29,7 @@ static esp_err_t bme280_get_id(i2c_cmd_handle_t command, uint8_t device_address)
// Step 8. STOP
i2c_master_stop(command);
// Step 7. Read one byte of data from register
cmd_ret = i2c_master_cmd_begin(I2C_NUM_0, command, 1000 / portTICK_PERIOD_MS);
esp_err_t cmd_ret = i2c_master_cmd_begin(I2C_NUM_0, command, 1000 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(command);
return cmd_ret;