Dwi259eti Firmware -

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

void my_feature_task(void *arg)

static const char *TAG = "my_feature";

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 Dwi259eti Firmware

// read 2‑byte temperature cmd = i2c_cmd_link_create(); i2c_master_start(cmd); i2c_master_write_byte(cmd, (0x48 << 1) Keeping the sensor‑reading code isolated makes unit‑testing easier and prevents the AT parser from becoming a monolith. 4.3 Glue Layer – AT Command (if applicable) // at_cmd_myfeat.c #include "at.h" #include "my_feature.h"

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;

float temperature; if (my_feature_get_temperature(&temperature) == 0) at_reply("%0.2f", temperature); else at_reply_error(); Add the registration call in the AT subsystem

static void at_cmd_temp_handler(at_cmd_ctx_t *ctx, const char *params)

// registration – called from at_init() void at_register_my_feature(void)

If the feature is periodic, spawn a FreeRTOS task: It will be your contract with the code

/* Example: read a temperature sensor on I2C address 0x48 */ int my_feature_get_temperature(float *temp_c) I2C_MASTER_WRITE, true); i2c_master_write_byte(cmd, 0x00, true); // register address i2c_master_stop(cmd); esp_err_t err = i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); if (err != ESP_OK) return -1;

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"

This is a standard notification.

Report an issue with my profile

Please use this form to report an issue with your artist profile or to request removal from our online catalog.

Leave your message and contact information below. We will send you a confirmation message or reach out if we have questions.

    Please update my profile
    Please delete my profile