RAJESH SINHA
Published © CERN-OHL2

LED blink using Raspberry Pi

In this project, we are going to construct a project-led blink using Raspberry pi.

IntermediateFull instructions provided5 hours11,007
LED blink using Raspberry Pi

Things used in this project

Story

Read more

Schematics

screenshot_(130)_gGocNDzTVQ.png

Code

Code for Led blink

Python
import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library
from time import sleep # Import the sleep function from the time module

GPIO.setwarnings(False) # Ignore warning for now
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
GPIO.setup(18, GPIO.OUT, initial=GPIO.LOW) # Set pin 18 to be an output pin and set initial value to low (off)

while True: # Run forever
 GPIO.output(18, GPIO.HIGH) # Turn on
 sleep(1) # Sleep for 1 second
 GPIO.output(18, GPIO.LOW) # Turn off
 sleep(1) # Sleep for 1 second

Credits

RAJESH SINHA

RAJESH SINHA

14 projects • 9 followers
Hey there! I'm Rajesh. I'm passionate about building innovative projects.mail id:- rajeshkumar15022004@gmail.com

Comments