Тёмный
No video :(

Project: Controlling An LED Using Raspberry Pi (Beginner) 

Confiding RPi
Подписаться 903
Просмотров 155 тыс.
50% 1

Hey Guys,
In this video you will learn to control an LED on a RPi
It is very Beginner friendly and one of the first projects in the Raspberry Pi
Installing gpiozero:
Python 3 - sudo apt-get install python3-gpiozero
Python 2 - sudo apt-get install python-gpiozero
Thanks for Watching!

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 124   
@shaheershaikh
@shaheershaikh 5 лет назад
Did this,,, I feel like a rocket scientist now :D
@qazme5310
@qazme5310 6 лет назад
Finally after trying different tutorials for hours and actually yours worked!! Thank you for the video. I already had python 3 installed in my Pi so I didn't have to use sudo.
@confidingrpi7174
@confidingrpi7174 6 лет назад
Great!
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
...
@incrediblygay
@incrediblygay 2 года назад
This tutorial doesn't work tf are you talking about?
@EchoVids2u
@EchoVids2u 6 лет назад
Finally, the first tutorial video I can understand.
@confidingrpi7174
@confidingrpi7174 6 лет назад
I am glad it could help you! :D
@chriswalker6062
@chriswalker6062 6 лет назад
Very good job clearly explaining a bit of coding. I will be back for more.
@sidharthakumar3497
@sidharthakumar3497 5 лет назад
i saw just 2 min of your video u explained everything in your video led , breadboard and each thing beginner and pro both can understand. nice and tx
@flaviogjoni5747
@flaviogjoni5747 3 года назад
3:19 my man died here
@poopmiller9744
@poopmiller9744 3 года назад
lol i thought the same thing
@Alex-xi3bw
@Alex-xi3bw Год назад
this guy sounds like a mad scientist
@anirudhpuranik5222
@anirudhpuranik5222 4 года назад
Loved the explanation! Thanks for the video.
@tomatrix7525
@tomatrix7525 3 года назад
This is the best tutorial ever, btw!
@MajorCaliber
@MajorCaliber Год назад
Good job, but since you're using "toggle", you could just make your while-loop contain 2 instructions instead of 4, and it would work exactly the same, eh wot? ;')
@nikhilchitroda6409
@nikhilchitroda6409 5 лет назад
Excellent explanation ... Bro, please make more videos like this ...😅👍
@skyjoe55
@skyjoe55 4 года назад
I was watching this on my pi and i forgot i didn't have speakers/headphones connected
@rogelioalonso5618
@rogelioalonso5618 3 года назад
i realize I'm pretty randomly asking but does anyone know a good website to stream newly released movies online?
@kannonbrixton9771
@kannonbrixton9771 3 года назад
@Rogelio Alonso lately I have been using flixzone. You can find it by googling =)
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
i'm very happy to be your fan! i looked at other videos and only two of them worked and one of them is you. but can you make a video of how to make two leds flash with a time limit?
@mattrhys-roberts2983
@mattrhys-roberts2983 2 года назад
Thanks for simplifying a great way to get started!
@rorygallagher628
@rorygallagher628 3 года назад
Cool, worked first time . Thanks
@manuchaudhary7902
@manuchaudhary7902 5 лет назад
Thank you. Its now working for me.
@KaurPreet_-gd8jy
@KaurPreet_-gd8jy 3 года назад
1.What software/hardware is needed in this project? 2.what hardware/electronics is needed in this project? 3.what other equipments will neend in this project?
@invincible.456
@invincible.456 3 года назад
So simple and yet so fun... that's cool!
@m3mphis_chick944
@m3mphis_chick944 4 года назад
666th subscriber, HAiL yaaaah. Thanks for posting this video man!
@MischiefMemoirs
@MischiefMemoirs Год назад
Thank you this was v helpful
@EchoVids2u
@EchoVids2u 6 лет назад
Also, you may get a warning when you run your program. If you put GPIO.cleanup() at the end of your program the "Use GPIO.setwarnings(False)" warning will go away.
@confidingrpi7174
@confidingrpi7174 6 лет назад
That happens only with the RPi.GPIO library I am (in this video) using the library gpiozero. gpiozero does not require cleanup
@kikihardxcoremedia2937
@kikihardxcoremedia2937 4 года назад
Thank you for telling me I can use resistors that are over 100 ohms. I some how couldn’t find any info. This other RU-vid channel was telling me to use 270 ohm and I’m like... but it’s a small light? 🤷🏻‍♀️
@abhijack.1036
@abhijack.1036 4 года назад
Led resistor design is simple Supply voltage-Led voltage ÷ Iled Supply voltage (Vs) is 5volts from rasberry pi board and led voltage is 3v and led current is 10milli ampere. (Vs-Vled) ÷ Iled 5-3 ÷ 10 x 10^-3 2 ÷ 10^-2 200 ohms. It not a standard value use standard value 220 ohms this is the correct design.
@alexwilhelm9182
@alexwilhelm9182 3 года назад
Great Explanation. Would like to suggest an advanced board for Raspberry pi. I am familiar with "Sania Box" and by using this board you can get hands-on experience on LED, 7-Segment, Buzzer, Sensors etc.
@fabrizziocht
@fabrizziocht 5 лет назад
Good explanation!! thanks for sharing
@lachiondo0097
@lachiondo0097 Год назад
if anyone got "TypeError: an integer is required (got type str)" Just substitute the line "K = input("Sleep for: ")" for "K = float(input("Sleep for: "))" and problem solve hope it helps
@vinayk9528
@vinayk9528 3 года назад
hats off for your accent lol 😂😂😂
@RMV0746
@RMV0746 5 лет назад
Iam like for your pro
@osirisreyes7605
@osirisreyes7605 Год назад
Muy bien
@wearesisterstube7354
@wearesisterstube7354 3 года назад
Nice
@bread-mp5kx
@bread-mp5kx 5 лет назад
Great vid!
@WillBlocher
@WillBlocher 5 лет назад
Excellent video
@haydenrhineberger4472
@haydenrhineberger4472 4 года назад
tryed it nice job
@LinuxRoutes
@LinuxRoutes 6 лет назад
Great guide!
@nageshraut3302
@nageshraut3302 3 года назад
Nice👍👍👍
@VikramSingh-de3dx
@VikramSingh-de3dx 6 лет назад
Very helpful video.😀
@mmuradiqbal-technuggets-ja3597
You are awesome man
@haluklacin4190
@haluklacin4190 3 года назад
great instruction
@tushar8994
@tushar8994 6 лет назад
can i do this also with 30 pins bread board plzZ reply fast
@confidingrpi7174
@confidingrpi7174 6 лет назад
Yes!
@shaizsiddiqui1101
@shaizsiddiqui1101 4 года назад
very nice
@atchutusapkar5545
@atchutusapkar5545 6 лет назад
nice explanation
@exla6204
@exla6204 6 лет назад
Nice , but i hope there are more in explaination like why LED(18) , what is toggle , on .. maybe u should put more information in description (or just link the phyton documentation )
@confidingrpi7174
@confidingrpi7174 6 лет назад
Thanks for the feedback, I will sure work on it!
@mylodefaut-juneja3705
@mylodefaut-juneja3705 2 года назад
At 5.10 @Confiding_RPi goes into documents but when I try it says 'No such file or Directory'. Can someone help please?
@ravitejabolli3049
@ravitejabolli3049 4 года назад
Yes, This is great
@doyouknow3483
@doyouknow3483 6 лет назад
good work
@arcreations3273
@arcreations3273 3 года назад
Can I do it using pc without Raspberry-pi/microcontroller/Arduino.?
@fatiaziz7433
@fatiaziz7433 4 года назад
hello.ik he de script van de led nodig.kan opsturen,of download. thanks for top review
@rohith4570
@rohith4570 4 года назад
Can we do this using windows 10 and python compiler
@fyzer1623
@fyzer1623 4 года назад
Why is the PIN number 18 of your led?
@TutorReceh
@TutorReceh 3 года назад
what color is the resistor ?
@TutorReceh
@TutorReceh 3 года назад
resistor size how many ohm ?
@harpermartin7813
@harpermartin7813 2 года назад
Jesus is King! If you do not know Jesus as Savior please pray, “ Jesus save me. At this moment I choose to have faith that You gave Your life for me and rose from the dead. Doing this You defeated death, even though it meant You had to die. You surrendered Your life for me, so I chose to surrender my life to You. Forgive me Jesus, my God. Amen.” Jesus loves you so much. Please accept His love. I encourage you to read the Bible and pray. “For God so loved the world that he gave his one and only begotten Son into this world, that whoever believes that in him shall not perish but have eternal life.” John 3:16 🙏❤️🙏 Jesus is enough! Again I tell you, Jesus loves you!
@jackbeer6202
@jackbeer6202 3 года назад
Just wanted to comment so it was a odd number. :)
@adityavshrikhande7645
@adityavshrikhande7645 5 лет назад
thank you bro
@mericet39
@mericet39 2 года назад
you don't need led.toggle() and time.sleep(k) twice.
@stephenwik2423
@stephenwik2423 Год назад
but having it twice inspired me to try different values say “K” and “L”… can run them really short, play with duty cycle… effectively brightness control
@mariammyriam5997
@mariammyriam5997 5 лет назад
Thank you for this video, I didn't understand why the LED is assigned to the 18th pin (in the picture) ?
@sitisallyaishak8555
@sitisallyaishak8555 4 года назад
becouse that was the pin 18
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
it is that the jumper cable is connected to pin 18 so it could get power for the led and yes the pin is on the picture
@rishabmudliar1058
@rishabmudliar1058 4 года назад
It can be any pin that is gpio I think so..
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
@@rishabmudliar1058 not really depends if the jumper cable if it is connected to a GND GPIO pin and a normal gpio pin
@BAT_24
@BAT_24 6 лет назад
Python 2 - sudo apt-get install python-gpiozero , after applying this im getting invalid operation. how i sort out this problm
@confidingrpi7174
@confidingrpi7174 6 лет назад
I hope your command was- "sudo apt-get install python-gpiozero" also the gpiozero library is preinstalled in official raspbian OS. If your command was exactly same as mentioned above then more information is required.
@voiceandwhistlesriakarsh3664
@voiceandwhistlesriakarsh3664 4 года назад
Bro can u make some video on and off the relay.
@JitenderKumar-up6nj
@JitenderKumar-up6nj 5 лет назад
How to connect IP camera And loop decter
@tdscwhelan
@tdscwhelan 5 лет назад
4:36 shouldn't you remove the power source before plugging anything in?
@vishnupriyatummala801
@vishnupriyatummala801 5 лет назад
no need
@mnmufid
@mnmufid 5 лет назад
Yes, you should ... No need if you not sure or it will blow your raspi.
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
it is alittle safer so you wont get a shock
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
while you are plugging in the led
@casperliu4884
@casperliu4884 5 лет назад
Yessssss
@gmadvancedtechnology504
@gmadvancedtechnology504 5 лет назад
the second code does not work in python3, but it works in python2 why? TypeError: an integer is required (got type str)
@GarlitoMc
@GarlitoMc 5 лет назад
try K=int(input("Sleep for: "))
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
@@GarlitoMcs code that he typed means the time for blinking
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
this is the code for the led turning on from gpiozero import LED import time led=LED(18) led.on() time.sleep(5) led.off()
@haluklacin4190
@haluklacin4190 3 года назад
I would use float instead of int @@GarlitoMc
@GarlitoMc
@GarlitoMc 3 года назад
@@haluklacin4190 Sure, you could do that too. I was just explaining that with K = input("Sleep for: "), K is a str type, while time.sleep(K) requires K to be a numerical value, int/float.
@anukritisingh7204
@anukritisingh7204 6 лет назад
Can you please please please tell me who you connected raspi 3 directly to the laptop?
@confidingrpi7174
@confidingrpi7174 6 лет назад
The Ethernet cable(mine is CAT5) is inserted in the Ethernet port on the Raspberry pi and the other end is inserted into my laptop(can also work with a desktop pc)
@vishnupriyatummala801
@vishnupriyatummala801 5 лет назад
@@confidingrpi7174 so bro pls help me out that ,u didn't connected any HDMI cable to monitor instead you connected the ETHERNET cable. Does RPI OS can work on the laptop with simply the ethernet cable connected? Does it affects our current laptop OS? I am using MacBook Air, it didn't contain any HDMI cable connection and I didn't know how to connect the ethernet cable to laptop! if possible pls pls make a tutorial on it............ pls sir it would be a great help
@spyarduinohacks5102
@spyarduinohacks5102 4 года назад
WHEN I TYPE leafpad Led.py it says command not found
@alericcusher11
@alericcusher11 3 года назад
Try "sudo apt install leafpad" The try entering "leafpad led.py"
@kctronics6329
@kctronics6329 7 лет назад
This video is very useful for beginners and I'm also trying to make such videos. Till now I had uploaded only one video, hope u watch that. :-)
@confidingrpi7174
@confidingrpi7174 7 лет назад
Sure!
@SixtySecond_
@SixtySecond_ 4 года назад
what if i want to use c ++
@rajnimmakayala
@rajnimmakayala 4 года назад
if you want to use it then.... USE IT!!!! :)
@user-el1gx2ve8c
@user-el1gx2ve8c 4 года назад
I named my file Led.py and when I type that into Terminal it says no such file exists
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
did you typ leafpad +Gvidas?!1?
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
leafpad Led.py?
@user-el1gx2ve8c
@user-el1gx2ve8c 4 года назад
@@TonyLee-cs1bu I figured out a way to do it, I just typed python the Documents/(Folder Name)/(File Name) and it opened
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
​@@user-el1gx2ve8c ok that works too but you can use thonny python IDE
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
it just shows leafpad
@gurpreetghotra5705
@gurpreetghotra5705 6 лет назад
what is the white thing called
@confidingrpi7174
@confidingrpi7174 6 лет назад
The board on which the LEDs are plugged -> Breadboard
@behrzz
@behrzz 5 лет назад
Hi I am a design student and have never used programmable LED , but for my senior design project I have to build an interactive LED (RGB) wall, the interactivity can be based on touch or motion . so when users touch or move the LED's colour tracks the user or a new colour is added to visualize the interactivity. some examples : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZItqHJF-l98.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-D_f0rzwi_LI.html So I need to know what sort of products I need to order to build this prototype. Thank you
@shivamnishad4773
@shivamnishad4773 5 лет назад
Sir , can you tell me the cost of this rasberry pi
@dominic_game_vlogs7859
@dominic_game_vlogs7859 5 лет назад
$35
@shivamnishad4773
@shivamnishad4773 5 лет назад
@@dominic_game_vlogs7859ok thanku sir
@TonyLee-cs1bu
@TonyLee-cs1bu 4 года назад
...
@AcapellaFella
@AcapellaFella 4 года назад
I hope you can sheee
@ordinaryraw542
@ordinaryraw542 5 лет назад
Why is the PIN number 18???
@jynclr
@jynclr 5 лет назад
I don't know if you figured this out yet, but I can help. Pause the video at 4:50. you'll see the red wire line goes to the row of pins that is to "GP18" on the board. (it's a drawing.) I had to watch this twice and pause to study the diagram.
@ordinaryraw542
@ordinaryraw542 5 лет назад
@@jynclr tnx!
@bigfiend4369
@bigfiend4369 5 лет назад
L E D !
@KIsuu-us2lf
@KIsuu-us2lf Месяц назад
Pakaya
@KIsuu-us2lf
@KIsuu-us2lf Месяц назад
Huththige putha
@j.sridhar7039
@j.sridhar7039 7 лет назад
The resister is how many omh
@confidingrpi7174
@confidingrpi7174 7 лет назад
You can use a resistor that is at least 470 ohms (in my experience I have not seen an led blow up with 470 ohms), you can use a higher value resistor but the led will be dimmer! Side-note: In the video I used a 1000 ohms resistor!
@JitenderKumar-up6nj
@JitenderKumar-up6nj 5 лет назад
Please send me connection and coading
@muhammadnoumankhan9735
@muhammadnoumankhan9735 6 лет назад
Can i take your email?
@jmlevy91
@jmlevy91 6 лет назад
:P
Далее
Raspberry Pi 4 Getting Started
24:54
Просмотров 2,3 млн
Raspberry Pi Automation #1: Mains Relay HAT
15:03
Просмотров 272 тыс.
Девочки, у вас тоже так? 💅🏻✨
00:17
الذرة أنقذت حياتي🌽😱
00:27
Просмотров 14 млн
The Petabyte Pi Project
22:27
Просмотров 2,2 млн
Raspberry Pi Projects
11:57
Просмотров 1,7 млн
The ULTIMATE Raspberry Pi 5 NAS
32:14
Просмотров 1,9 млн
Raspberry Pi 5: EVERYTHING you need to know
20:32
Просмотров 1,1 млн
Control ANY COMPUTER with these Pi KVMs!
17:46
Просмотров 819 тыс.
Traffic Lights🚦with Raspberry Pi - Part 1
7:08
Просмотров 6 тыс.
I Made My Own Computer | Let's See How It Works
7:51
Просмотров 770 тыс.
the Raspberry Pi 5
17:57
Просмотров 1,1 млн
Девочки, у вас тоже так? 💅🏻✨
00:17