main/iotbalkon.c

changeset 9
1659bd3c7a2b
parent 8
115e93bf8796
child 12
bb72d448e282
equal deleted inserted replaced
8:115e93bf8796 9:1659bd3c7a2b
19 19
20 static TaskHandle_t xTaskBMP280 = NULL; 20 static TaskHandle_t xTaskBMP280 = NULL;
21 static TaskHandle_t xTaskINA219 = NULL; 21 static TaskHandle_t xTaskINA219 = NULL;
22 static TaskHandle_t xTaskMQTT = NULL; 22 static TaskHandle_t xTaskMQTT = NULL;
23 static TaskHandle_t xTaskWifi = NULL; 23 static TaskHandle_t xTaskWifi = NULL;
24 24 static TaskHandle_t xTaskOUT = NULL;
25 nvs_handle_t my_handle;
26 25
27 #define MAX_LOOPS 32 26 #define MAX_LOOPS 32
28 #define SUB_TIME 1000 27 #define SUB_TIME 1000
29 28
30 float temperature; 29 float temperature;
274 273
275 274
276 void app_main(void) 275 void app_main(void)
277 { 276 {
278 uint64_t totalTime, gTimeInMillis; 277 uint64_t totalTime, gTimeInMillis;
278 nvs_handle_t my_handle;
279 279
280 #ifdef CONFIG_CODE_PRODUCTION 280 #ifdef CONFIG_CODE_PRODUCTION
281 ESP_LOGI(TAG, "Starting production"); 281 ESP_LOGI(TAG, "Starting production");
282 #endif 282 #endif
283 #ifdef CONFIG_CODE_TESTING 283 #ifdef CONFIG_CODE_TESTING
388 xSemaphoreINA219 = xSemaphoreCreateMutex(); 388 xSemaphoreINA219 = xSemaphoreCreateMutex();
389 389
390 390
391 xTaskCreate(&task_bmp280, "task_bmp280", 2560, NULL, 8, &xTaskBMP280); 391 xTaskCreate(&task_bmp280, "task_bmp280", 2560, NULL, 8, &xTaskBMP280);
392 xTaskCreate(&task_ina219, "task_ina219", 2560, NULL, 8, &xTaskINA219); 392 xTaskCreate(&task_ina219, "task_ina219", 2560, NULL, 8, &xTaskINA219);
393 xTaskCreate(&task_out, "task_out", 2560, NULL, 9, &xTaskOUT);
393 // esp_log_level_set("MQTT_CLIENT", ESP_LOG_ERROR); 394 // esp_log_level_set("MQTT_CLIENT", ESP_LOG_ERROR);
394 xTaskCreate(&task_mqtt, "task_mqtt", 4096, NULL, 5, &xTaskMQTT); 395 xTaskCreate(&task_mqtt, "task_mqtt", 4096, NULL, 5, &xTaskMQTT);
395 // esp_log_level_set("wifi", ESP_LOG_ERROR); 396 // esp_log_level_set("wifi", ESP_LOG_ERROR);
396 xTaskCreate(&task_wifi, "task_wifi", 4096, NULL, 3, &xTaskWifi); 397 xTaskCreate(&task_wifi, "task_wifi", 4096, NULL, 3, &xTaskWifi);
397 398
398 vTaskDelay(10 / portTICK_PERIOD_MS); 399 vTaskDelay(10 / portTICK_PERIOD_MS);
399 400

mercurial