From a0153b67a264e2a6b74afe83876e013520b7cd18 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Sat, 4 Oct 2025 02:33:12 -0400 Subject: [PATCH] esp32 temperature node --- .../main/hello_world_main.c | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ESP32-IDF_Temperture-Node-v2/main/hello_world_main.c b/ESP32-IDF_Temperture-Node-v2/main/hello_world_main.c index 7127adbac..9655bc4ea 100644 --- a/ESP32-IDF_Temperture-Node-v2/main/hello_world_main.c +++ b/ESP32-IDF_Temperture-Node-v2/main/hello_world_main.c @@ -31,22 +31,18 @@ static const char *TAG = "i2c-simple-example"; -static esp_err_t i2c_driver_initialize(void) -{ - int i2c_master_port = 0; +int i2c_master_port = 0; - i2c_config_t conf = { - .mode = I2C_MODE_MASTER, - .sda_io_num = 21, - .sda_pullup_en = GPIO_PULLUP_ENABLE, - .scl_io_num = 22, - .sda_pullup_en = GPIO_PULLUP_ENABLE, - .master.clk_speed = I2C_MASTER_FREQ_HZ, - .clk_flags= 0, - }; +i2c_config_t conf = { + .mode = I2C_MODE_MASTER, + .sda_io_num = 21, + .sda_pullup_en = GPIO_PULLUP_ENABLE, + .scl_io_num = 22, + .sda_pullup_en = GPIO_PULLUP_ENABLE, + .master.clk_speed = I2C_MASTER_FREQ_HZ, + .clk_flags= 0, +}; - return i2c_param_config(i2c_master_port, &conf); -} void app_main(void) {