Page 1 of 1

FYI - temp_sensor example from v5.2.1 doesn't compile

Posted: Mon Mar 11, 2024 12:50 am
by RoatanBill
/home/bill/espSketches/temp_sensor/main/temp_sensor_main.c: In function 'app_main':
/home/bill/esp/v5.2.1/esp-idf/components/driver/temperature_sensor/include/driver/temperature_sensor.h:42:20: error: 'TEMPERATURE_SENSOR_CLK_SRC_DEFAULT' undeclared (first use in this function); did you mean 'TEMPERATURE_SENSOR_CONFIG_DEFAULT'?
42 | .clk_src = TEMPERATURE_SENSOR_CLK_SRC_DEFAULT, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bill/espSketches/temp_sensor/main/temp_sensor_main.c:18:54: note: in expansion of macro 'TEMPERATURE_SENSOR_CONFIG_DEFAULT'
18 | temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bill/esp/v5.2.1/esp-idf/components/driver/temperature_sensor/include/driver/temperature_sensor.h:42:20: note: each undeclared identifier is reported only once for each function it appears in
42 | .clk_src = TEMPERATURE_SENSOR_CLK_SRC_DEFAULT, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bill/espSketches/temp_sensor/main/temp_sensor_main.c:18:54: note: in expansion of macro 'TEMPERATURE_SENSOR_CONFIG_DEFAULT'
18 | temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: FYI - temp_sensor example from v5.2.1 doesn't compile

Posted: Mon Mar 11, 2024 5:33 pm
by MicroController
The ESP32-S2/C3/S3/C2 has a built-in temperature sensor.
Which SoC/IDF_TARGET are you building for?