mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 11:10:53 +00:00
temp sensor
This commit is contained in:
@@ -12,7 +12,7 @@ static const char *TAGt = "ESP-NOW_Transmitter";
|
||||
EXP32-C3 Chip built-in temprature sensor
|
||||
Read & display the temperature value
|
||||
*/
|
||||
static void temp_sensor_task (void *arg) {
|
||||
void temp_sensor_task (void *arg) {
|
||||
while (true) {
|
||||
ESP_LOGI(TAGt, "Reading sensor temperature");
|
||||
float tsens_value;
|
||||
@@ -21,7 +21,7 @@ static void temp_sensor_task (void *arg) {
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
}
|
||||
static void chip_sensor_init () {
|
||||
void chip_sensor_init () {
|
||||
temp_sensor = NULL;
|
||||
temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50);
|
||||
ESP_ERROR_CHECK(temperature_sensor_install(&temp_sensor_config, &temp_sensor));
|
||||
|
Reference in New Issue
Block a user