esp32/modesp32: Add mcu_temperature() function for C3/S2/S3 devices.
For ESP32C3/S2/S3 IDFv5 exposes new internal temperature API which is different to the base ESP32, IDFv4. Thanks to @robert-hh for cleaner code and testing sensor capability in these devices. See discussion #10443. Signed-off-by: Rick Sorensen <rick.sorensen@gmail.com>
This commit is contained in:
committed by
Damien George
parent
595f86155a
commit
63c30a2dfc
@@ -67,6 +67,12 @@ Note that the temperature sensor in the ESP32 will typically read higher than
|
||||
ambient due to the IC getting warm while it runs. This effect can be minimised
|
||||
by reading the temperature sensor immediately after waking up from sleep.
|
||||
|
||||
ESP32C3, ESP32S2, and ESP32S3 also have an internal temperature sensor available.
|
||||
It is implemented a bit differently to the ESP32 and returns the temperature in
|
||||
Celsius::
|
||||
|
||||
esp32.mcu_temperature() # read the internal temperature of the MCU, in Celsius
|
||||
|
||||
Networking
|
||||
----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user