WIFi
Dependencies: WiflyInterface mbed
main.cpp
- Committer:
- mayu_hori
- Date:
- 2014-10-09
- Revision:
- 0:cfdce53ce25b
File content as of revision 0:cfdce53ce25b:
#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(); }