Advertisement
Guest User

ESP32 Hello

a guest
Dec 9th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "sdkconfig.h"
  3. #include "freertos/FreeRTOS.h"
  4. #include "freertos/task.h"
  5. #include "esp_system.h"
  6. #include "esp_spi_flash.h"
  7.  
  8. void app_main(void)
  9. {
  10.     printf("Hello world!\n");
  11.     for (int i = 10; i >= 0; i--) {
  12.         printf("Restarting in %d seconds...\n", i);
  13.         vTaskDelay(1000 / portTICK_PERIOD_MS);
  14.     }
  15.     printf("Restarting now.\n");
  16.     fflush(stdout);
  17.     esp_restart();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement