V1

Dependencies:   simple-mbed-client

main.cpp

Committer:
johnlynam2014
Date:
2017-03-07
Revision:
1:bb3336b7e953
Parent:
0:94dec0f696e0

File content as of revision 1:bb3336b7e953:

#include "mbed.h"
#include "rtos.h"
//#include "config.h"
#include "security.h"
#include "easy-connect.h"
#include "simple-mbed-client.h"
#include "hcsr04.h"
#include "function.h"

  SimpleMbedClient client;

int main(int, char**)
{
   run();
   
    NetworkInterface* network = easy_connect(true);
    if (!network)
    {
        printf("Connect to internet failed... See serial output.\n");
        return 1;
    }

    struct MbedClientOptions options = client.get_default_options();
    options.DeviceType = "Wifi_Sonic_Test";
    if (!client.setup(options, network))
    {
        printf("Setting up mbed_client failed...\n");
        return 1;
    }
}