Using Serial To Control An LED

You might take a look at Bitlash, which you will find at at http://bitlash.net -- Bitlash is a serial interpreter which runs entirely on Arduino, and it supports "macros" which are stored sequences of operations.

Here is how you might define on and off for your requirements:

> startup:="pinmode(13,1)"
> on:="d13=1"
> off:="d13=0"

Then you can say:

> on

or

> off

And the pin D13 will turn on and off, controlling your LED.

Happy hacking,

-br

http://entropymouse.com