ESP32 CPU Temperature


If you are asking a question, please follow this template:

  1. My goal is: How to know current cpu temperature of ESP32 controller.
  2. My actions are: I am tried finding it in official documentation and googling for the same.
  3. The result I see is: I able to get the cpu frequency from of the function mentioned in official documentation.
  4. My expectation & question is: If it is possible to achieve with mongoose os, please let me know.

Thanks and regards
Lokesh CJ


There was an undocumented function provided by the idf-sdk which seems to be obsolete/unsupported.

I don’t know if works right now:

#ifdef __cplusplus
extern "C" {
extern uint8_t temprature_sens_read();
#ifdef __cplusplus

To use it

uint8_t temp = temprature_sens_read();
float temp_celsius = (temp - 32.0) / 1.8;

And yes, it is temprature, not temperature;