ECE4180 Lab 4

Dependencies:   4DGL-uLCD-SE NTPClient WiflyInterface mbed

Fork of Wifly_HelloWorld by Samuel Mokrani

main.cpp

Committer:
samux
Date:
2012-08-17
Revision:
3:3b84102f022e
Parent:
2:31905fe9369f
Child:
4:fd030db1a6f4

File content as of revision 3:3b84102f022e:

#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
*     - true means that the security of the network is WPA
*/
WiflyInterface wifly(p9, p10, p25, p26, "ARMASE06", "armasedemo", true);

int main() {
    wifly.init(); // use DHCP
    while (!wifly.connect()); // join the network
    printf("IP Address is %s\n\r", wifly.getIPAddress());
}