Learn Blinking LED with Raspberry Pi. Learn the working with GPIO (General Purpose Input Output) pins in Raspberry Pi. Currently, we are using Raspberry Pi 3 Model B Board. So, let’s start.
Step 1: Required Components
LED (generic) x 1
Breadboard x 1
Raspberry Pi Board x 1
220 Ω Resistor x 1
Step 2: Circuit Time
Step 3: Code Time
This is the code for Blinking LED with Raspberry PI. First imported GPIO and Time Library. Set the GPIO 17 as an output pin. In while loop, GPIO is set to high, delay for a second, set the pin to low and delay for a second.
Step 4: Run code to Raspberry Pi
Run the Python program in your Raspberry Pi after setting components as per circuit diagram. The LED will turn on and off.
For running python code in Raspberry PI, visit: raspberrypi.org/documentation/usage/python/
For basic hardware information about Raspberry PI 3, Click here.