Add api to get CPU temperature
Fixes: https://github.com/espressif/arduino-esp32/issues/563 Fixes: https://github.com/espressif/arduino-esp32/issues/625 Source: https://github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchb ook/ESP32_int_temp_sensor/ESP32_int_temp_sensor.ino
This commit is contained in:
parent
ab0ea2f6da
commit
db79c2ee95
@ -23,6 +23,15 @@
|
||||
#include "esp_log.h"
|
||||
#include <sys/time.h>
|
||||
|
||||
//Undocumented!!! Get chip temperature in Farenheit
|
||||
//Source: https://github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchbook/ESP32_int_temp_sensor/ESP32_int_temp_sensor.ino
|
||||
uint8_t temprature_sens_read();
|
||||
|
||||
float temperatureRead()
|
||||
{
|
||||
return (temprature_sens_read() - 32) / 1.8;
|
||||
}
|
||||
|
||||
void yield()
|
||||
{
|
||||
vPortYield();
|
||||
|
@ -61,6 +61,9 @@ void yield(void);
|
||||
#include "esp32-hal-bt.h"
|
||||
#include "esp_system.h"
|
||||
|
||||
//returns chip temperature in Celsius
|
||||
float temperatureRead();
|
||||
|
||||
unsigned long micros();
|
||||
unsigned long millis();
|
||||
void delay(uint32_t);
|
||||
|
Loading…
Reference in New Issue
Block a user