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 "EthernetNetIf.h" 00003 #include "logger.h" 00004 00005 DigitalOut myled(LED1); 00006 EthernetNetIf eth; 00007 logger *syslog; 00008 00009 int main() { 00010 EthernetErr r; 00011 int i; 00012 char buf[100]; 00013 00014 r = eth.setup(); 00015 if (r) { 00016 printf("Error %d in setup.\n", r); 00017 return -1; 00018 } 00019 00020 syslog = new logger(ð, "192.168.1.8", "mbed"); 00021 00022 i = 0; 00023 while(1) { 00024 Net::poll(); 00025 sprintf(buf, "message %d", i++); 00026 syslog->send("test:", buf); 00027 wait(5); 00028 } 00029 }
Generated on Tue Jul 12 2022 20:55:47 by
1.7.2