state information
This commit is contained in:
@@ -11,21 +11,18 @@
|
||||
#include "ygg_http_server.h"
|
||||
#include "ygg_bmp280.h"
|
||||
#include "ygg_http_req.h"
|
||||
#include "ygg_state.h"
|
||||
|
||||
|
||||
static const char *TAG = "thermo_sensor";
|
||||
float last_temperature = 0.0f;
|
||||
float last_pressure = 0.0f;
|
||||
float last_humidity = 0.0f;
|
||||
bmp280_t dev_bmp_280;
|
||||
|
||||
void main_loop(void *pvParameters) {
|
||||
while (1) {
|
||||
vTaskDelay(pdMS_TO_TICKS(10000));
|
||||
ygg_bmp280_read_sensor(&dev_bmp_280);
|
||||
ygg_send_sensor_redouts(last_temperature,
|
||||
last_pressure,
|
||||
last_humidity);
|
||||
ygg_send_sensor_readouts(SENSOR_NAME,
|
||||
CURR_READOUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user