ESP32 CPU Temperature

#1

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

#2

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" {
#endif
extern uint8_t temprature_sens_read();
#ifdef __cplusplus
}
#endif

To use it

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

And yes, it is temprature, not temperature;