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.
Dependencies: EthernetInterface RdWebServer mbed-rtos mbed
Diff: main.cpp
- Revision:
- 1:486b1571d1c4
- Parent:
- 0:d5f69749da59
- Child:
- 2:24fd130c3600
diff -r d5f69749da59 -r 486b1571d1c4 main.cpp
--- a/main.cpp Wed Sep 18 21:37:04 2013 +0000
+++ b/main.cpp Thu Sep 19 12:06:43 2013 +0000
@@ -6,6 +6,8 @@
#define PORT 80
+Serial pc(USBTX, USBRX);
+
RdWebServer webServer;
EthernetInterface eth;
@@ -27,8 +29,14 @@
}
}
+void handleCmd_Up(char* argStr)
+{
+ printf("UP COMMAND %s\n\r", argStr);
+}
+
int main (void)
{
+ pc.baud(115200);
ledTick.attach(&ledTickfunc,0.5);
// setup ethernet interface
@@ -36,6 +44,7 @@
eth.connect();
printf("IP Address is %s\n\r", eth.getIPAddress());
+ webServer.addCommand("up", &handleCmd_Up);
webServer.init(PORT, &led2);
webServer.run();