Skip to content
Snippets Groups Projects
Commit 33d7479a authored by Dorababu A's avatar Dorababu A
Browse files

Print esp32 basic info

parent d143bf2b
No related branches found
No related tags found
No related merge requests found
[env:esp32]
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:esp32]
platform = espressif32
framework = espidf
framework = espidf
board = esp32dev
monitor_speed = 115200
;lib_deps =
; shepherd/
lib_deps = shepherd/
......@@ -5,18 +5,22 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "sdkconfig.h"
#include "spi_flash_mmap.h"
#include "esp_log.h"
// Shepehrd task to print metrics
static void shepherd_task(void *args) {
while (1) {
printf("---------Shepherd Chibby-----------\n");
printf("\n---------Shepherd Chibby-----------\n");
// get chip info
esp_chip_info_t esp_info;
esp_chip_info(&esp_info);
printf("Number of CPU cores : %d\n", esp_info.cores);
printf("Chip model : %d\n", esp_info.model);
vTaskDelay(10000 / portTICK_PERIOD_MS);
esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
printf("ESP32, %d CPU cores, WiFi%s%s, ",
chip_info.cores,
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
printf("silicon revision %d, ", chip_info.revision);
vTaskDelay(15000 / portTICK_PERIOD_MS);
}
vTaskDelete(NULL);
}
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment