1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| #include <ESP8266WiFi.h> const char* ssid="WiFi名称"; const char* password="WiFi密码"; void setup() { Serial.begin(9600); int i = 0; WiFi.begin(ssid,password); while(WiFi.status()!= WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println('\n'); Serial.print("Connected to "); Serial.println(WiFi.SSID()); Serial.print("IP address:\t"); Serial.println(WiFi.localIP()); } void loop() { }
|