mX mbed BaseBoard Ethernet

Dependencies:   mbed lwip

main.cpp

Committer:
ashwin_athani
Date:
2010-12-08
Revision:
0:072dedec0039

File content as of revision 0:072dedec0039:

#include "mbed.h"
#include "HTTPClient.h"

DigitalOut led(LED1);
HTTPClient http;

/* 
  execute a php script that returns the time
  
  <?php
  print strftime('%c');
  ?>

*/


int main(void) {

  char result[64];

  const char url[] = "http://mbed5.dh.bytemark.co.uk/~chris/time.php";
 // printf ("Fetching from : %s\n",url);
 
  http.get(url, result);

  // Display the page content:
  //printf("Result is: %s\n", result);

  // Work is done!
  while(1) {
    led = !led;
    wait(0.2);
  }
}