WIFi

Dependencies:   WiflyInterface mbed

Revision:
0:cfdce53ce25b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 09 22:53:43 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "WiflyInterface.h"
+
+
+
+Serial pc(USBTX, USBRX);
+ 
+/* wifly object where:
+*     - p9 and p10 are for the serial communication
+*     - p25 is for the reset pin
+*     - p26 is for the connection status
+*     - "mbed" is the ssid of the network
+*     - "password" is the password
+*     - WPA, WEP_128 or NONE is the security CAMBIAR EL WIFLY.H 
+*/
+//
+
+WiflyInterface wifly(D1, D0, D2, D3, "iPhone de Mayumi", "vs8uykp08iro", WPA) ; //WiflyInterface( PinName tx, PinName rx, PinName reset, PinName tcp_status,const char * ssid, const char * phrase, Security sec) 
+// mbed Application Board
+//WiflyInterface wifly(p9, p10, p30, p29, "mbed", "password", WPA);
+ 
+int main() {
+    wifly.init(); // use DHCP
+    while (!wifly.connect()); // join the network
+    printf("IP Address is %s\n\r", wifly.getIPAddress());
+    wifly.disconnect();
+}
\ No newline at end of file