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: mbed HTTPServer EthernetNetIf
Revision 3:e95519dde71d, committed 2020-09-02
- Comitter:
- solarca2
- Date:
- Wed Sep 02 14:34:24 2020 +0000
- Parent:
- 2:bd69e4df7955
- Commit message:
- t
Changed in this revision
| HTTPServerHelloWorld.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTTPServerHelloWorld.cpp Fri Jul 09 14:46:34 2010 +0000
+++ b/HTTPServerHelloWorld.cpp Wed Sep 02 14:34:24 2020 +0000
@@ -5,22 +5,24 @@
EthernetNetIf eth;
HTTPServer svr;
+Serial pc(USBTX,USBRX);
+
DigitalOut led1(LED1);
int main() {
- printf("Setting up...\n");
+ pc.printf("Setting up...\n");
EthernetErr ethErr = eth.setup();
if(ethErr)
{
- printf("Error %d in setup.\n", ethErr);
+ pc.printf("Error %d in setup.\n", ethErr);
return -1;
}
- printf("Setup OK\n");
+ pc.printf("Setup OK\n");
svr.addHandler<SimpleHandler>("/"); //Default handler
svr.bind(80);
- printf("Listening...\n");
+ pc.printf("Listening...\n");
Timer tm;
tm.start();