Learn the Blinking LED with Raspberry Pi. Learn the working with GPIO (General Purpose Input Output) pins in Raspberry Pi. Currently, we are using the Raspberry Pi 3 Model B Board. So, let’s start.
Step 1: Required Components
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 a 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 the circuit diagram. The LED will turn on and off.