#include <WiFi.h>
void setup()
{
Serial.begin(9600);
WiFi.disconnect();
delay(3000);
Serial.println("START");
WiFi.begin("Free","12345678");
while ((!(WiFi.status() == WL_CONNECTED))){
delay(300);
Serial.print("..");
}
Serial.println("Connected");
Serial.println("Your IP is");
Serial.println((WiFi.localIP()));
}
void loop()
{
}
類似的寫法
#include <WiFi.h>
void setup()
{
Serial.begin(9600);
WiFi.begin("Free","12345678");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println(WiFi.localIP());
}
void loop()
{
}
沒有留言:
張貼留言