1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Changes to integrate latest core updates to WiFly branch

This commit is contained in:
mlafauci
2011-08-31 10:34:51 +02:00
parent 9785b99cba
commit 00b945d869
23 changed files with 136 additions and 251 deletions

View File

@ -6,10 +6,10 @@
A simple server is setup to exchange data.
created 13 July 2010
by Domenico La Fauci
by dlf (Metodo2 srl)
*/
#include <WiFi.h>
#include <IPAddress.h>
#define _PRINT_
byte mac[6] = { 0 };
@ -23,12 +23,12 @@ int status = WL_IDLE_STATUS;
char ssidList[MAX_NUM_SSID][32] = { {0} };
Server server(23);
WiFiServer server(23);
boolean gotAMessage = false; // whether or not you got a message from the client yet
void printIpData()
{
ip = WiFi.localIp();
ip = WiFi.localIP();
Serial.print("\nIP: ");
Serial.print(ip[3],10);Serial.print(".");
@ -153,8 +153,7 @@ void execCmd(char* buf)
Serial.print("\nExecuting command: ");
Serial.println(buf);
#endif
//server.write(buf);
server.print(buf);
server.write(buf);
}
@ -163,7 +162,7 @@ void loop()
if (status == WL_CONNECTED)
{
byte _status = 0;
Client client = server.available(&_status);
WiFiClient client = server.available(&_status);
if (client) {
if (!gotAMessage) {
Serial.println("\nWe have a new client\n");