1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-20 21:01:25 +03:00

Cleaning the code

This commit is contained in:
mlafauci
2011-04-30 07:48:10 +02:00
parent c10210a881
commit 8d1761f009
5 changed files with 29 additions and 72 deletions

View File

@ -119,10 +119,12 @@ void setup()
{
Serial.begin(9600);
Serial.println("*** Start WiFi example ***");
delay(3000);
WiFi.begin();
// Wait for initialize WiFi
delay(3000);
scanNetworks();
int _status = startWiFiWpa();
@ -156,27 +158,13 @@ void loop()
{
byte _status = 0;
Client client = server.available(&_status);
//delay(2000);
if (client) {
if (!gotAMessage) {
Serial.println("\nWe have a new client\n");
client.println("Hello, client!");
gotAMessage = true;
}
/*
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes back to the client:
server.write(thisChar);
// echo the bytes to the server as well:
Serial.print(thisChar);
*/
/*
Serial.print("Status: ");
Serial.println(_status, 16);
delay(2000);
*/
static byte idx = 0;
while (client.available())