Saturday, May 2, 2015

WiFi status LED

If you want to know if your ESP8266 is connected to your WiFi router, solution is to add a simple led to an not used GPIO ( can use also GPIO 0 for ESP-01) and call a function.

//install status wifi LED on GPIO0
#define WIFI_LED_IO_MUX     PERIPHS_IO_MUX_GPIO0_U
#define WIFI_LED_IO_NUM     0
#define WIFI_LED_IO_FUNC    FUNC_GPIO0



and call wifi status led function at the beginning of your user_init() function BEFORE any 
WIFI action to your router.

wifi_status_led_install(WIFI_LED_IO_NUM, WIFI_LED_IO_MUX, FUNC_GPIO0); 


Connected LED will  blink when trying to connect or having an error, it will switch off when everything is fine.


A short video with wifi status led:







1 comment:

  1. How would I go about if I want to set up the esp as an Access point and it's not connected to wifi. Basically communicating between phone and esp module. Is there a way to show when communication between phone wifi and esp module is established.

    ReplyDelete