evenjc

ESP32-WiFi

May 23rd, 2023 (edited)
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <WiFi.h>
  2.  
  3. const char* ssid = "ssid";
  4. const char* password = "passord";
  5.  
  6. WiFiClient espClient;
  7.  
  8. void setup() {
  9.   Serial.begin(115200);
  10.   WiFi.begin(ssid, password);
  11.  
  12.   while (WiFi.status() != WL_CONNECTED) {
  13.     delay(500);
  14.     Serial.print(".");
  15.   }
  16.  
  17.   Serial.println("");
  18.   Serial.println("WiFi connected");
  19.   Serial.println("IP address: ");
  20.   Serial.println(WiFi.localIP());
  21. }
  22.  
  23. void loop() {
  24.  
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment