Search found 7 matches
- Sun Feb 05, 2023 5:30 am
- Forum: ESP-IDF
- Topic: AP Mode - esp_wifi_set_config throwing error
- Replies: 1
- Views: 1916
AP Mode - esp_wifi_set_config throwing error
Creating a program to start the ESP8266 in AP Mode. But everytime I run it the function esp_wifi_set_config throws an error Error : ESP_ERROR_CHECK failed: esp_err_t 0x2 (ERROR) at 0x40220064 0x40220064: _esp_error_check_failed at C:/esp/ESP8266_RTOS_SDK/components/freertos/port/esp8266/panic.c:206 ...
- Fri Dec 09, 2022 11:32 am
- Forum: General Discussion
- Topic: Non Blocking LED Blink Function
- Replies: 6
- Views: 5692
Re: Non Blocking LED Blink Function
Ok now it seems I did not include the following line in my code which did not allow me to suspend or delete my tasks :
#define INCLUDE_vTaskSuspend 1
Now it works okay.
#define INCLUDE_vTaskSuspend 1
Now it works okay.

- Fri Dec 09, 2022 11:26 am
- Forum: General Discussion
- Topic: Non Blocking LED Blink Function
- Replies: 6
- Views: 5692
Re: Non Blocking LED Blink Function
Probably many ways to do this. One way would be to set up a FreeRTOS message queue which your while loop can scan. Send it a message from another task to change the delay time. You could also unit the task with a pointer to a static variable that defines the delay time and use that instead of hard ...
- Fri Dec 09, 2022 6:13 am
- Forum: General Discussion
- Topic: Non Blocking LED Blink Function
- Replies: 6
- Views: 5692
Re: Non Blocking LED Blink Function
I have implemented another method to try to do it, but seems to be a problem again. In the files I have uploaded here : https://github.com/Abhesheksh/led-message-code In gpio.c (https://github.com/Abhesheksh/led-message-code/blob/main/gpio.c) I have the following functions : BaseType_t led_send_mess...
- Thu Dec 08, 2022 9:15 am
- Forum: General Discussion
- Topic: Non Blocking LED Blink Function
- Replies: 6
- Views: 5692
Re: Non Blocking LED Blink Function
Thanks for your response. I was trying to do something similar to the first option. I created a Task like this : void create_led_blink_tasks(){ BaseType_t xReturned; xReturned = xTaskCreate(&led_blink,"LED_BLINK",2048,NULL,5,&led_task_handle); if(xReturned == pdPASS ) { /* The task was created. Use ...
- Wed Dec 07, 2022 6:28 pm
- Forum: General Discussion
- Topic: Non Blocking LED Blink Function
- Replies: 6
- Views: 5692
Non Blocking LED Blink Function
Hi All, I am trying to build LED blinking functions at different speeds, to denote the connection status of the wifi. A simple while(1) like this : void led_fast(){ ESP_LOGI(TAG, "LED FAST INITIATED"); while (1) { gpio_set_level(LED,0); vTaskDelay(500/portTICK_RATE_MS); gpio_set_level(LED,1); vTaskD...
- Mon Nov 21, 2022 3:17 pm
- Forum: ESP-IDF
- Topic: MQTT Publish Issue
- Replies: 1
- Views: 1832
MQTT Publish Issue
Here is my code : int mqtt_publish(char message[]) { int msg_id = 0; ESP_LOGI(TAG, "MQTT_EVENT_CONNECTED"); mqtt_topic_t *mqtt_topic = get_mqtt_topic(); msg_id = esp_mqtt_client_publish(client,mqtt_topic->topic, message, 0, 1, 0); ESP_LOGI(TAG, "sent publish successful, msg_id=%d", msg_id); return m...