Dwi259eti Firmware Today

// Save a float threshold to NVS esp_err_t my_feature_save_threshold(float thr)

Write this spec in a short markdown file ( FEATURE_SPEC.md ). It will be your contract with the code. Below is a generic flow; adapt the file names and APIs to the DWI259ETI SDK you have. 4.1 Add New Source Files (or extend existing ones) src/ ├─ feature/ │ ├─ my_feature.c // core logic │ └─ my_feature.h └─ at/ └─ at_cmd_myfeat.c // AT parser glue (if needed) 4.2 Core Logic ( my_feature.c ) #include "my_feature.h" #include "driver/gpio.h" #include "driver/i2c.h" #include "nvs.h" #include "esp_log.h"

at_register_command("AT+TEMP?", at_cmd_temp_handler, AT_CMD_TYPE_QUERY); 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

If the feature is periodic, spawn a FreeRTOS task: // Save a float threshold to NVS esp_err_t

static const char *TAG = "my_feature";

Add the registration call in the AT subsystem init routine (often at_init.c ). If the feature needs user‑configurable thresholds: while (1) float temp

/* Example: read a temperature sensor on I2C address 0x48 */ int my_feature_get_temperature(float *temp_c) raw[1]; *temp_c = raw_temp / 256.0f; return 0;