Minimize contract, add ADC read and send its data to coonsole
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user