esp-idf/examples/peripherals/temp_sensor_esp32s2
fuzhibo baa7898e35 driver(adc/dac): fix adc dac driver for esp32s2
1. update register file about adc; 2. fix adc driver; 3. add UT for adc/dac;

See merge request espressif/esp-idf!7776
2020-04-01 12:41:51 +08:00
..
main driver(adc/dac): fix adc dac driver for esp32s2 2020-04-01 12:41:51 +08:00
CMakeLists.txt add Comment for touchpad 2019-08-07 11:39:17 +08:00
Makefile add Comment for touchpad 2019-08-07 11:39:17 +08:00
README.md fix markdown table formatting 2020-02-18 12:30:56 +01:00

ESP32-S2 Temperature Sensor Example

The ESP32-S2 has a built-in temperature sensor. The temperature sensor module contains an 8-bit Sigma-Delta ADC and a temperature offset DAC.

The conversion relationship is the first two columns of the table below. Among them, offset = 0(default) is the main measurement option, and other values are extended measurement options.

DAC level offset measure range(℃) measure error(℃)
0 -2 50 ~ 125 < 3
1 -1 20 ~ 100 < 2
2 0 -10 ~ 80 < 1
3 1 -30 ~ 50 < 2
4 2 -40 ~ 20 < 3
  • Log output :
I (243) TempSensor: Initializing Temperature sensor
I (243) TempSensor: default dac 2, clk_div 6
I (243) TempSensor: Config temperature range [-10°C ~ 80°C], error < 1°C
I (253) TempSensor: Temperature sensor started
I (1253) TempSensor: Temperature out celsius 27.287399°C
I (2253) TempSensor: Temperature out celsius 26.848801°C
I (3253) TempSensor: Temperature out celsius 26.848801°C
I (4253) TempSensor: Temperature out celsius 27.287399°C
I (5253) TempSensor: Temperature out celsius 27.287399°C