mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 13:30:50 +00:00
ESPNOW + WiFi
This commit is contained in:
@@ -328,6 +328,7 @@ static void temp_sensor_task (void *arg) {
|
|||||||
float tsens_value;
|
float tsens_value;
|
||||||
ESP_ERROR_CHECK(temperature_sensor_get_celsius(temp_sensor, &tsens_value));
|
ESP_ERROR_CHECK(temperature_sensor_get_celsius(temp_sensor, &tsens_value));
|
||||||
ESP_LOGW("ESP32-C3", "Temperature value %.02f ℃", tsens_value);
|
ESP_LOGW("ESP32-C3", "Temperature value %.02f ℃", tsens_value);
|
||||||
|
mqtt_publish_temp (tsens_value);
|
||||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user