Last active
August 29, 2015 13:57
-
-
Save joksan/9845714 to your computer and use it in GitHub Desktop.
Programa de prueba d WiFly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuracion del WiFly | |
======================= | |
(sin fin de linea) | |
$$$ | |
(carriage return) | |
set wlan ssid Taller$Arduino$Day | |
set ip local 80 | |
save | |
Comandos utiles | |
=============== | |
get wlan | |
factory RESET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include "WiFly.h" | |
WiFlyServer server(80); | |
void setup() { | |
WiFly.begin(); | |
Serial.begin(9600); | |
Serial.print("IP: "); | |
Serial.println(WiFly.ip()); | |
server.begin(); | |
} | |
void loop() { | |
WiFlyClient client = server.available(); | |
if (client) { | |
client.println("HTTP/1.1 200 OK"); | |
client.println("Content-Type: text/html"); | |
client.println(); | |
client.println("<HTML>"); | |
client.println("<BODY>"); | |
client.println("<H1> Hola mundo! </H1>"); | |
client.println("</BODY>"); | |
client.println("</HTML>"); | |
client.flush(); | |
client.stop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
include <SPI.h>
include "WiFly.h"
Server server(80);
void setup() {
WiFly.begin();
Serial.begin(9600);
WiFly.join("ArduinoDay");
Serial.print("IP: ");
Serial.println(WiFly.ip());
server.begin();
}
void loop() {
Client client = server.available();
if (client) {
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
client.println("");
client.println("");
client.println("
Hola mundo!
");client.println("");
client.println("");
client.flush();
client.stop();
delay(10);
}
}