Connect ESP8266 to Wi-Fi Router Upload these code to your Arduino WeMos D1 ESP8266 W-Fi board. #include <ESP8266WiFi.h> //SSID of your network char ssid[] = " myRouter"; //SSID of your Wi-Fi router char pass[] = " myPassWord"; //Password of your Wi-Fi router void setup() { Serial.begin(115200); delay(10); // Connect to Wi-Fi network Serial.println(); Serial.println(); Serial.print("Connecting to..."); Serial.println(ssid); WiFi.begin(ssid, pass); while ( WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("Wi-Fi connected successfully"); } void loop ( ) {} Using ESP8266 to connect to Wi-Fi need to use the function of: WiFi.begin(ssid, pass); // connect to target Wi-Fi SSID is the name of the Wi-Fi you want to connect to. while ( ...
Share projects and codes I have done with Arduino, microcontrollers, DRV8825, Esp8266, stepper motors and Internet of things(IoT).