Guest User

Untitled

a guest
Oct 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <ESP8266WiFi.h>
  2.  
  3. const char* ssid = "your-ssid";
  4. const char* password = "your-password";
  5.  
  6. void setup() {
  7. Serial.begin(115200);
  8. delay(10);
  9.  
  10. Serial.println();
  11. Serial.print("Connecting to ");
  12. Serial.println(ssid);
  13. WiFi.mode(WIFI_STA);
  14. WiFi.begin(ssid, password);
  15.  
  16. while (WiFi.status() != WL_CONNECTED) {
  17. delay(500);
  18. Serial.print(".");
  19. }
  20.  
  21. Serial.println("");
  22. Serial.println("WiFi connected");
  23. Serial.println("IP address: ");
  24. Serial.println(WiFi.localIP());
  25. }
  26.  
  27. void loop() {
  28. }
Add Comment
Please, Sign In to add comment