#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();
  }
}
