esp32 temperature node

This commit is contained in:
2025-10-04 00:57:11 -04:00
parent fdc9a41020
commit 33b8801128
7 changed files with 1681 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ void app_main(void)
printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size());
//i2c_master_init();
i2c_bus_handle_t i2c_bus = i2c_bus_create(I2C_MASTER_NUM, I2C_MASTER_SDA_IO, I2C_MASTER_SCL_IO, I2C_MASTER_FREQ_HZ);
i2c_bus_handle_t i2c_bus = i2c_bus_create(I2C_MASTER_NUM, I2C_MASTER_SDA_IO, I2C_MASTER_SCL_IO);
sensor = bme280_create(i2c_bus, BME280_SENSOR_ADDR);
ESP_ERROR_CHECK(bme280_default_init(sensor));
ESP_ERROR_CHECK(bme280_read_temperature(sensor, &temperature));