Step 1: Hardware setup
Place the LED with a 270 ohm resistor in series with the GND and GPIO pin of Raspberry Pi (use a breadboard for hassle free connection). Always use a resistor with LEDs to limit the current, else you might end up with a burnt LED 😉
For complete details & schematics, please visit my blog :- http://www.rpiblog.com/2012/09/using-gpio-of-raspberry-pi-to-blink-led.html
Step 2: Code
Python is used to control the GPIO’s in Raspberry Pi.
For complete details & code, please visit my blog :- http://www.rpiblog.com/2012/09/using-gpio-of-raspberry-pi-to-blink-led.html
For more detail: LED Blinking with Raspberry Pi