First submit, make led blink
This commit is contained in:
32
Provider/main/main.cpp
Normal file
32
Provider/main/main.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
// STD Lib
|
||||
#include <stdio.h>
|
||||
|
||||
// SDK
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_log.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/gpio_num.h"
|
||||
|
||||
// Project cpp
|
||||
#include "connect.cpp"
|
||||
#include "led_status.cpp"
|
||||
|
||||
extern "C" void app_main() {
|
||||
setup_led();
|
||||
printf("Hello, Worldi!\n");
|
||||
set_led_status(led_status::Connecting);
|
||||
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
set_led_status(led_status::Ready);
|
||||
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
set_led_status(led_status::Failed);
|
||||
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
destroy_led();
|
||||
}
|
||||
Reference in New Issue
Block a user