Page 639 - 3-2
P. 639
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
delay(500);
Serial.print("connecting to ");
Serial.println(host);
// Use WiFiClient class to create TCP connections
}
void loop() {
while (!client.connect(host, port)) {
Serial.println("connection failed");
Serial.println("wait 5 sec...");
delay(5000);
}
if (client.connect(host,port)){
Serial.println("connection succes");
}
delay(1000);
if(client.available())
{
client.println(0x00);
client.stop();
}
Serial.println(client.available());
delay(10000);
}
-----------------------------------
소리센서
/*
Blinks built in pin13 LED on a 16mhz Arduino when it detects a 700 hz tone
which is inside of 1, 2, and 3 buttons (but not the others) on your phone's keypad,
Othwerise google for a tone generator on the web or an app for your phone.
I like this one http://onlinetonegenerator.com/
Frequency sampling is .. squishy business. Be prepared to mess with the
numbers below until you get something you like.
This work is entirely based on the Kevin Banks code found at
- 639 -