f
Fork of lwip by
Diff: examples/httpservodemo/main.cpp
- Revision:
- 0:5e1631496985
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/httpservodemo/main.cpp Tue May 08 15:32:10 2012 +0100 @@ -0,0 +1,23 @@ +#include "mbed.h" +#include "HTTPServer.h" +#include "HTTPRPC.h" +#include "Servo.h" + +Servo servo(p21, "servo"); +DigitalOut led(LED1, "myled"); +DigitalOut bigled1( p6, "bigled1"); +DigitalOut bigled2( p7, "bigled2"); +DigitalOut bigled3( p8, "bigled3"); +DigitalOut bigled4( p9, "bigled4"); +DigitalOut bigled5(p10, "bigled5"); +DigitalOut bigled6(p11, "bigled6"); +DigitalOut bigled7(p12, "bigled7"); +HTTPServer http; + +int main() { + http.addHandler(new HTTPRPC("/rpc")); + while (1) { + led = !led; + http.poll(); + } +}