Dwi259eti Firmware Apr 2026
static void at_cmd_temp_handler(at_cmd_ctx_t *ctx, const char *params)
void my_feature_task(void *arg)
/* 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; Dwi259eti Firmware
static const char *TAG = "my_feature";
// Save a float threshold to NVS esp_err_t my_feature_save_threshold(float thr) static void at_cmd_temp_handler(at_cmd_ctx_t *ctx
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 *temp_c = raw_temp / 256.0f
// registration – called from at_init() void at_register_my_feature(void)