Good morning,
I get a problem using the temperature sensor of the Esp32S3.
I am trying to use the sensor in order to measure an ambiant T° of -18°C or something near this T°.
My T° sensor is configured in the range [50; 125], and I would like the temperature_sensor_get_celsius method to tell
ESP_FAIL (Because the measured T° is outside the T° range°).
I configure the T° sensor this way :
temperature_sensor_config_t temp_sensor_config;
temperature_sensor_handle_t TempSensor;
temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(50, 125);
temperature_sensor_install(&temp_sensor_config, &TempSensor);
temperature_sensor_enable(TempSensor);
esp_err_t err = temperature_sensor_get_celsius(TempSensor, &Temperature);
However, the err is not 0xFFFF. The method answers 0x0000 but the Temperature given by the method is not correct.
Do you know what can happen ?
Best regards,
Thomas TRUILHE
ESP32S3 : Temperature Sensor (T° out of range)
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 : Temperature Sensor (T° out of range)
Moreover, last time I did the test, the method sent me 0xFFFF as a result
and the firmware told the error message "Temperature out of range..." or something like that.
No (Today), I did the test again and I do not get the same result.
The error code is 0x0000 and the error message is not displayed anymore.
However, the T° measured is out of the range and the method gave me a strange/wrong value.
Thank you for your help,
If you have any idea
and the firmware told the error message "Temperature out of range..." or something like that.
No (Today), I did the test again and I do not get the same result.
The error code is 0x0000 and the error message is not displayed anymore.
However, the T° measured is out of the range and the method gave me a strange/wrong value.
Thank you for your help,
If you have any idea
-
- Posts: 76
- Joined: Tue Sep 12, 2017 11:25 am
Re: ESP32S3 : Temperature Sensor (T° out of range)
Hello, you can try this syntax
temperature_sensor_handle_t temp_handle = NULL;
temperature_sensor_config_t temp_sensor = {
.range_min = 20,
.range_max = 50,
};
ESP_ERROR_CHECK(temperature_sensor_install(&temp_sensor, &temp_handle));
temperature_sensor_handle_t temp_handle = NULL;
temperature_sensor_config_t temp_sensor = {
.range_min = 20,
.range_max = 50,
};
ESP_ERROR_CHECK(temperature_sensor_install(&temp_sensor, &temp_handle));
Re: ESP32S3 : Temperature Sensor (T° out of range)
The issue is when the device is put in an environemnt that out of current
setting range, the API does not return any error but a wrong reading.
i.e. There is no way to know the out-of-range with certain devices.
setting range, the API does not return any error but a wrong reading.
i.e. There is no way to know the out-of-range with certain devices.
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 : Temperature Sensor (T° out of range)
Thank you for your answers,
so can you explain me when the API returns an error ?
In what case exactly ?
Best regards,
so can you explain me when the API returns an error ?
In what case exactly ?
Best regards,
-
- Posts: 1725
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Who is online
Users browsing this forum: Google [Bot] and 338 guests