Digital I/O control using strings with arduino mega

This is a series of simple projects aimed at getting started with Arduino. This will cover most of the important peripherals of the Arduino starting from simple Digital I/Os and serial communication interfaces.

1:UART-Digital I/O control using serial port.
2:UART-Digital I/O control .
3:UART-Digtial Thermometer.
4:UART-PIR sensor intruder detection.

In this we are going to see the experiment 

Digital I/O control using strings:

connect the led to pin 13 and power supply 5v and ground 

if the input is given as a string 'on' the led turns on

and if the input is given as string 'off' the led turns off.