Xively Demo - WIZ550io, W5500 (WIZnet) + Temperature Sensor (DS18B20) EthernetInterfaceW5500 + LPC11U68 Xpresso v2 used

Dependencies:   DS18B20_1wire W5500Interface libxively mbed

Fork of WIZ550io_Xively_Demo by Bongjun Hur

Xively Demo

Board Pic

LPC11U68 + WIZ550io (WIZnet) + DS18B20 Temp Sensor https://31.media.tumblr.com/d63982be5ee62cb7889cde9e685ee757/tumblr_n8s27sY62b1sama12o1_500.jpg

PC Screenshot

/media/uploads/Bongjun/img135.png

main.cpp

Committer:
samux
Date:
2012-01-30
Revision:
2:31905fe9369f
Parent:
1:49e1e9ed6e39
Child:
3:3b84102f022e

File content as of revision 2:31905fe9369f:

#include "mbed.h"
#include "Wifly.h"

Serial pc(USBTX, USBRX);

/* wifly object where:
*     - p9 and p10 are for the serial communication
*     - p17 is for the reset pin
*     - "mbed" is the ssid of the network
*     - "password" is the password
*     - true means that the security of the network is WPA
*/
Wifly wifly(p9, p10, p21, "mbed", "password", true);


int main() {
    char recv[129];
    
    // join the network specified in the constructor
    while (!wifly.join()) {
        printf("cannot to join the network, will retry!\r\n");
        wifly.reset();
    }
    
    printf("network joined!\r\n");
    
    //print all received messages
    while(1)
    {
        if(wifly.readable()) {
            wifly.read(recv);
            printf("read: %s\r\n", recv);
        }
        wait(0.2);
    }
}