Playback starts YouTube’s embedded player (privacy-enhanced mode).
How to Blink LED using Raspberry pi 4 | Python Script
ChannelRobotica DIYDescription from the creator
How to Blink LED using Raspberry pi 4 | Python Script. we will also make LED blink using gpiozero and RPi.GPIO library.
Scroll down for code.....
Please like & Subscribe for more videos
If you want to support my video please buy any product through my amazon affiliate link. I will receive a commission, at no extra cost to you.
LIST OF COMPONENT (affiliate links)
amzn.to/2noWmWm (Raspberry pi 4 model B)
amzn.to/2nm0d6x (Raspberry pi 4 power supply)
amzn.to/2APAvuf (Dual fan heat sink aluminium armor Raspberry Pi 4 case) Optional
amzn.to/2mIHAJF (microSD card)
amzn.to/2vSpUON (LED)
amzn.to/2wxPmWz (Breadboard)
amzn.to/2vJ3lvo (Jumper wire)
amzn.to/2vmSK8l (Resistor)
Song: Extenz - Gravity (Vlog No Copyright Music)
Music provided by Vlog No Copyright Music.
Video Link: youtu.be/Dqads4X-WuQ
1) gpiozero
#blinking with gpiozero library
from gpiozero import LED
from time import sleep
led = LED(23)
while True:
led.on()
print('LED ON')
sleep(1)
led.off()
print('LED OFF')
sleep(1)
2) Rpi.GPIO
#blink with RPi.GPIO library
import RPi.GPIO as GPIO
import time
ledPin = 16
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(ledPin,GPIO.OUT)
while True:
GPIO.output(ledPin, GPIO.HIGH)
print('LED ON')
time.sleep(1)
GPIO.output(ledPin, GPIO.LOW)
print('LED OFF')
time.sleep(1)
Scroll down for code.....
Please like & Subscribe for more videos
If you want to support my video please buy any product through my amazon affiliate link. I will receive a commission, at no extra cost to you.
LIST OF COMPONENT (affiliate links)
amzn.to/2noWmWm (Raspberry pi 4 model B)
amzn.to/2nm0d6x (Raspberry pi 4 power supply)
amzn.to/2APAvuf (Dual fan heat sink aluminium armor Raspberry Pi 4 case) Optional
amzn.to/2mIHAJF (microSD card)
amzn.to/2vSpUON (LED)
amzn.to/2wxPmWz (Breadboard)
amzn.to/2vJ3lvo (Jumper wire)
amzn.to/2vmSK8l (Resistor)
Song: Extenz - Gravity (Vlog No Copyright Music)
Music provided by Vlog No Copyright Music.
Video Link: youtu.be/Dqads4X-WuQ
1) gpiozero
#blinking with gpiozero library
from gpiozero import LED
from time import sleep
led = LED(23)
while True:
led.on()
print('LED ON')
sleep(1)
led.off()
print('LED OFF')
sleep(1)
2) Rpi.GPIO
#blink with RPi.GPIO library
import RPi.GPIO as GPIO
import time
ledPin = 16
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(ledPin,GPIO.OUT)
while True:
GPIO.output(ledPin, GPIO.HIGH)
print('LED ON')
time.sleep(1)
GPIO.output(ledPin, GPIO.LOW)
print('LED OFF')
time.sleep(1)
About this tutorial
Robotica DIY published this 4:24 video tutorial on November 1, 2019. It has been watched 12,561 times on YouTube.
- Channel
- Robotica DIY
- Category
- Science & Technology
- Duration
- 4:24
- Published
- November 1, 2019
- Views
- 12,561
- Likes
- 135
Tags
Share
This tutorial in other languages
- FRComment LED Blink en utilisant 4 Raspberry Pi | Script Python
- ESCómo parpadeo del LED usando Frambuesa Pi 4 | script Python
- PTComo LED Blink usando Raspberry Pi 4 | Python Script
- ITCome Blink LED usando Raspberry Pi 4 | script Python
- DEWie erfolgt die Blink-LED mit Raspberry Pi 4 | Python Script
- NLHoe maak je Blink LED met behulp van Raspberry Pi 4 | Python Script
- RUКак моргания светодиода с помощью Raspberry Pi 4 | Python Script
- PLJak Blink LED za pomocą Raspberry Pi 4 | Python Script
- JA点滅LEDにラズベリーパイ4を使用した方法| Pythonのスクリプト
- ARكيفية الطرفة LED باستخدام توت العليق بي 4 | بيثون سيناريو
- HIकैसे Blink एलईडी के लिए रास्पबेरी पाई 4 का उपयोग | अजगर स्क्रिप्ट
- IDCara Blink LED menggunakan Raspberry pi 4 | Python Script