WeMOS: WiFi Connect

From OnnoWiki
Jump to navigation Jump to search
#include <ESP8266WiFi.h> 
void setup() {
  Serial.begin(115200); //Baudrate
  Serial.println("WeMOS 2866 starts");
  WiFi.begin("Kampus ITTS","itts2021");
  Serial.print("Connecting...");
  while(WiFi.status()!=WL_CONNECTED){ //Loop which makes a point every 500ms until the connection process has finished
    delay(500);
    Serial.print(".");
  }
  Serial.println();
  Serial.print("Connected! IP-Address: ");
  Serial.println(WiFi.localIP()); //Displaying the IP Address
}

void loop() {
  // put your main code here, to run repeatedly:
}


Referensi