Dwi259eti: Firmware
while (1) float temp; if (my_feature_get_temperature(&temp) == 0) ESP_LOGI(TAG, "Temp = %.2f°C", temp); // Optionally publish via MQTT vTaskDelay(pdMS_TO_TICKS(10000)); // 10 s interval
at_register_command("AT+TEMP?", at_cmd_temp_handler, AT_CMD_TYPE_QUERY); Dwi259eti Firmware
void my_feature_task(void *arg)
nvs_handle_t h; ESP_ERROR_CHECK(nvs_open("my_feat", NVS_READWRITE, &h)); ESP_ERROR_CHECK(nvs_set_blob(h, "threshold", &thr, sizeof(thr))); ESP_ERROR_CHECK(nvs_commit(h)); nvs_close(h); return ESP_OK; while (1) float temp
static const char *TAG = "my_feature";
// registration – called from at_init() void at_register_my_feature(void) if (my_feature_get_temperature(&temp) == 0) ESP_LOGI(TAG
// Save a float threshold to NVS esp_err_t my_feature_save_threshold(float thr)