Files
esp-air-monitor/main/main.c
Arthur Roberts 6b9ec20b72 Started some DHT22 stuff
Haven't tested it at all
2023-10-23 22:34:21 +01:00

24 lines
464 B
C

/*
* Author: Arthur Roberts (c) 2023
*
* License: GPLv3+
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "dht22.h"
void app_main(void)
{
int ret = dht22_temperature();
printf("Hello world! - dhtRet: %i\n", ret);
for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\n", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
printf("Restarting now.\n");
fflush(stdout);
esp_restart();
}