31 lines
632 B
C
31 lines
632 B
C
|
|
#include "display.h"
|
|
#include "sensors.h"
|
|
#include "wifi.h"
|
|
#include "server.h"
|
|
#include <esp_log.h>
|
|
|
|
void app_main(void)
|
|
{
|
|
int32_t temp = -12;
|
|
uint32_t pressure = 0;
|
|
uint32_t humidity = 0;
|
|
int32_t temp2 = 0;
|
|
uint32_t pressure2 = 0;
|
|
uint32_t humidity2 = 0;
|
|
|
|
init_sensors();
|
|
init_display();
|
|
wifi_init_sta();
|
|
init_server();
|
|
|
|
while (1) {
|
|
read_sensor(&temp, &pressure, &humidity);
|
|
read_sensor2(&temp2, &pressure2, &humidity2);
|
|
server_set_values(temp, pressure, humidity, temp2, pressure2, humidity2);
|
|
display_data(temp, pressure, humidity, temp2, pressure2, humidity2);
|
|
vTaskDelay(500 / portTICK_PERIOD_MS);
|
|
}
|
|
}
|
|
|