code example:
import esp
import esp32
temp_f = round(esp32.raw_temperature(), 2)
temp_c = round(((esp32.raw_temperature()-32)/1.8), 2)
print('Temperature F:', temp_f,' F')
print('Temperature C:', temp_c, ' C')
what is the problem?
code that worked on esp32 does not work on esp32 c3
Re: code that worked on esp32 does not work on esp32 c3
There is no temperature sensor in the ESP32 C3, and thus the method esp32.raw_temperature() does not exist.
Re: code that worked on esp32 does not work on esp32 c3
but the dadshit says that there is a temperature sensor.
https://www.espressif.com/sites/default ... eet_en.pdf
thank you for your responses
Alex
Re: code that worked on esp32 does not work on esp32 c3
If the data sheet mentions it, it should be physically present, but the API in the esp32 module is missing. And thus you cannot use it. Anyhow, it would tell you the temperature of the ESP32 chip, which is usually not of interest and hardly related to the outside temperature.