Minimize contract, add ADC read and send its data to coonsole

This commit is contained in:
2026-04-13 00:04:48 +03:00
parent 732a2dfa32
commit 977227296e
12 changed files with 269 additions and 67 deletions

View File

@@ -4,6 +4,8 @@
#include "freertos/projdefs.h"
#include "freertos/task.h"
#include "protocol.h"
#include "sampler_task.h"
#include "sender_task.h"
static const char* TAG = "iot_fish";
@@ -11,16 +13,8 @@ extern "C" void app_main(void)
{
system_init();
for (int i=0; i<5; i++)
{
char buf[512];
int len = build_telemetry_single(buf, sizeof(buf), "123", "dev1", 123456, "temperature", 22.5, "C", nullptr, 0);
if (len > 0) {
ESP_LOGI("protocol", "%s\n", buf);
}
vTaskDelay(pdMS_TO_TICKS(1000));
}
sampler_task_start();
sender_task_start();
system_finalize();
}