Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "nvs_flash.h"
uint8_t temprature_sens_read();
uint32_t hall_sens_read();
void read_sens_task(void *pvParameters)
{
while (1) {
printf("ESP32 onchip Temperature = %d\n", temprature_sens_read());
printf("ESP32 onchip Hall sensor = %d\n", hall_sens_read());
vTaskDelay(4000 / portTICK_PERIOD_MS);
}
}
void app_main()
{
nvs_flash_init();
system_init();
printf("Welcome to Noduino Quantum\r\n");
printf("Try to read the sensors inside the ESP32 chip ... \r\n");
xTaskCreatePinnedToCore(&read_sens_task, "read_sens_task", 1024, NULL, 5,
NULL, 0);
}
Quick start: http://wiki.jackslab.org/ESP32_Onchip_Sensor