In the previous article I discussed how to make ESP8266 an Access point.
And in this article, I will show you how to connect ESP8266 to a wifi network (making ESP8266 as a client).
Before proceeding to the tutorial, make sure you have added the ESP8266 Board to the Arduino IDE. If not, it will be useless for you to follow this tutorial. To add the ESP8266 board to the Arduino IDE see in this article "Get Started With ESP8266 (NodeMCU Lolin V3)"
this is the component that you need in this tutorial:
After you add the ESP8266 board to the Arduino IDE. there will be additional sample programs specifically for ESP8266 that can be used. To connect ESP8266 to a WiFi network. That means we will change the EPS8266 mode to become a WiFi client. this is the way:
#define STASSID "your-ssid" //the name of the wifi to be used #define STAPSK "your-password" //password
After that, upload the sketch to the ESP8266 board. And wait until it's finished.