modified: main/src/http_client.c
modified: main/src/main.c
This commit is contained in:
1 parent
e950fcec8f
commit
f5bf4fc361
2 files changed
+84
-40
No files matched your search
@@ -64,12 +64,16 @@ void main_task(void* args) {
|
||||
hc_register(&id);
|
||||
while (1)
|
||||
{
|
||||
hc_send_sensor_data(id,0,0); //test
|
||||
/*
|
||||
if (dht_read_float_data(DHT_TYPE_DHT22, DHT_GPIO, &humidity, &temperature) == ESP_OK) {
|
||||
} else {
|
||||
hc_send_sensor_data(id,humidity,temperature);
|
||||
}
|
||||
else {
|
||||
printf("Fail to get dht temperature data\n");
|
||||
}
|
||||
hc_send_sensor_data(id,humidity,temperature);
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +81,7 @@ void app_main()
|
||||
{
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
|
||||
xTaskCreate(main_task, "main task", 2048, NULL, tskIDLE_PRIORITY, NULL);
|
||||
|
||||
// WIFI
|
||||
wifi_init();
|
||||
//hc_test();
|
||||
|
||||
xTaskCreate(main_task, "main task", 2048, NULL, tskIDLE_PRIORITY, NULL);
|
||||
}
|
||||
Reference in new issue
Block a user