Added latest updates

This commit is contained in:
2024-05-29 19:12:31 +01:00
parent 6036752937
commit 353e1ee452
3 changed files with 34 additions and 7 deletions

View File

@@ -99,8 +99,11 @@ void read_from_dht22() {
// This should be: if (10 minutes of sample taken)
// TODO: check max samples / second that can fit in 10 minutes
/*
if (num_samples_last_ten_mins >=
((10 * 60) / (CONFIG_DHT22_PERIOD_POLL))) {
*/
if (num_samples_last_ten_mins >= 20) {
ESP_LOGW(TAG, "10 minutes of samples collected. Average temp: %f",
temperature_tmp);
num_samples_last_ten_mins = 0;
@@ -129,7 +132,6 @@ void app_main(void) {
ESP_ERROR_CHECK(ret);
#ifdef CONFIG_DHT22_ENABLED
init_dht22_data();
xTaskCreate(read_from_dht22, "DHT22",
4 * 1024, // honestly I have _no_ idea
NULL,
@@ -156,4 +158,6 @@ void app_main(void) {
&ds18b20_handle);
#endif /* CONFIG DS18B20_ENABLED */
start_wifi();
start_server();
init_dht22_data();
}