Blinking LED with Raspberry Pi
In this tutorial you will learn how to connect a LED to your Raspberry Pi’s GPIO pin and make it blink using Python.
On your Raspberry Pi, open a terminal window. Install python by the following commands.
sudo apt-get update
sudo apt-get install -y python-dev python-rpi.gpio
Download and save this file on your desktop
With the following commands you can execute the Python script that makes the LED blink:
The LED will blink every second. Press Ctrl + C to terminate the execution of the Python script