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:







No comments:

Post a Comment