ECE4180 Lab 4

Dependencies:   4DGL-uLCD-SE NTPClient WiflyInterface mbed

Fork of Wifly_HelloWorld by Samuel Mokrani

Committer:
samux
Date:
Fri Aug 17 10:57:22 2012 +0000
Revision:
3:3b84102f022e
Parent:
2:31905fe9369f
Child:
4:fd030db1a6f4
first commit with new wifly interface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 0:90ba0f51aa64 1 #include "mbed.h"
samux 3:3b84102f022e 2 #include "WiflyInterface.h"
samux 1:49e1e9ed6e39 3
samux 1:49e1e9ed6e39 4 Serial pc(USBTX, USBRX);
samux 1:49e1e9ed6e39 5
samux 1:49e1e9ed6e39 6 /* wifly object where:
samux 1:49e1e9ed6e39 7 * - p9 and p10 are for the serial communication
samux 3:3b84102f022e 8 * - p25 is for the reset pin
samux 3:3b84102f022e 9 * - p26 is for the connection status
samux 1:49e1e9ed6e39 10 * - "mbed" is the ssid of the network
samux 1:49e1e9ed6e39 11 * - "password" is the password
samux 1:49e1e9ed6e39 12 * - true means that the security of the network is WPA
samux 1:49e1e9ed6e39 13 */
samux 3:3b84102f022e 14 WiflyInterface wifly(p9, p10, p25, p26, "ARMASE06", "armasedemo", true);
samux 0:90ba0f51aa64 15
samux 1:49e1e9ed6e39 16 int main() {
samux 3:3b84102f022e 17 wifly.init(); // use DHCP
samux 3:3b84102f022e 18 while (!wifly.connect()); // join the network
samux 3:3b84102f022e 19 printf("IP Address is %s\n\r", wifly.getIPAddress());
samux 1:49e1e9ed6e39 20 }