Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "HTTPClient.h" 00003 00004 DigitalOut led(LED1); 00005 HTTPClient http; 00006 00007 /* 00008 execute a php script that returns the time 00009 00010 <?php 00011 print strftime('%c'); 00012 ?> 00013 00014 */ 00015 00016 00017 int main(void) { 00018 00019 char result[64]; 00020 const char url[] = "http://mbed5.dh.bytemark.co.uk/~chris/time.php"; 00021 printf ("Fetching from : %s\n",url); 00022 00023 http.get(url, result); 00024 00025 // Display the page content: 00026 printf("Result is: %s\n", result); 00027 00028 // Work is done! 00029 while(1) { 00030 led = !led; 00031 wait(0.2); 00032 } 00033 }
Generated on Sat Jul 30 2022 10:30:22 by
1.7.2