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: WiFlyHTTPServer WiflyInterface mbed-rpc mbed-rtos mbed
main.cpp
00001 #include "mbed.h" 00002 #include "HttpServer.h" 00003 #include "FsHandler.h" 00004 #include "LocalFileSystem.h" 00005 00006 DigitalOut myled(LED1); 00007 00008 Serial pc(USBTX, USBRX, "pc"); 00009 00010 static LocalFileSystem local("local"); 00011 00012 00013 int main() { 00014 pc.baud(460800); 00015 00016 HTTPFsRequestHandler::mount("/local/", "/"); 00017 00018 HttpServer svr(p9, p10, p30, p29, "Spawnpoint", "Quantenoptik1", WPA); 00019 00020 svr.addHandler<HTTPFsRequestHandler>("/"); 00021 // Start the server 00022 if (!svr.start(80) ) { 00023 error("SERVER FAILED TO START"); 00024 } 00025 00026 while(1) { 00027 myled = 1; 00028 wait(0.2); 00029 myled = 0; 00030 wait(0.2); 00031 } 00032 }
Generated on Mon Jul 25 2022 15:06:43 by
1.7.2