led control through ethernet

20 Nov 2010 . Edited: 20 Nov 2010

hai ,

can any one help me to control the led's from ethernet cable.

myself successfully  communicate with ethernet port and also develop my own page with 4 buttons to control the led's but unfortunately i don't know how the data comes into the controller when i press the led buttons on my HTML page

20 Nov 2010

Hi

It sounds like you've got the HTTP server working. The quickest way to control mbed Inputs and outputs etc over HTTP is probably to use the RPC interface. You can do this over HTTP by adding the RPC handler and registering the classes you want to use in the HTTP server program. The cookbook page Interfacing Using RPC page explains this and includes example code for mbed.

The commands are passed to the mbed as HTTP requests, so you can just type them in at the address bar of your browser. There are two main ways that you could send the data from the buttons on your HTML page, either JavaScript or using a Java applet. The cookbook page Interfacing with Java has a complete example for controlling the LEDs and you can get the library to help create your own code. However if you don't want to use a Java applet then you might prefer to use JavaScript, the Interfacing with JavaScript page provides a library which will handle all of the communication and abstraction of the mbed objects and some examples of its use. An good example using the JavaScript RPC library to control servos using sliders in a HTML page can be found here