Raspberry Pi Blinking LED
HTML-код
- Опубликовано: 11 сен 2024
- Today we are going to learn how to wire up a LED with a resister for our Raspberry Pi to control using the Python language and GPIO pins.
GPIO Layout: goo.gl/x5U6th
Get your Pi:
Raspberry Pi 3 - amzn.to/2jINKSY
Raspberry Pi Starter Kit - amzn.to/2jIG3vJ
Raspberry Pi Deluxe Breakout Kit - amzn.to/2jFILn8
~-~~-~~~-~~-~
Raspberry Pi 3 Setup - • Raspberry Pi 3 Setup
SUB GOAL ► ||||||||||||||| 54% ||............. 54.3K/100K
⭐ LATEST SUBSCIBER ► John Nino Doligol ⭐
--------------------
SUBSCRIBE - goo.gl/4X3sH8
PATREON - goo.gl/itXnwT
DISCORD - / discord
--------------------
GEAR I USE:
Mic - amzn.to/2dMWRVd
Mouse - amzn.to/2dSF7o6
Webcam - amzn.to/2hlFOcl
Portable Hard Drive - amzn.to/2dMVQMO
USB Portable Battery - amzn.to/2lABRQz
Outro Song: TheFatRat - Unity
Since you've been consistently uploading, I've been checking up for new updates every time I go on youtube. You're a natural teacher.
Eric Dunn thank you. I am trying to get 1 a day up.
THANK YOU! I'm using a LePotato and I am a novice with electronics (I'm a software developer) and I got confused on pin numbering. Your tutorial got me squared away and IT'S ALIVE!!!
I’m new to Pi but have been building computers for years, very new to coding though. This tutorial was by far the most straight forward and easiest to understand/follow for a beginner in this area. Thank you. I wasted TOO much time reading and watching other videos. You had me get this done in under the 12 minutes of your video. Thank you very much.
This is so much easier to understand than the others I tried. Thank you.
just got a Pi3 as a gift. enjoying the play with it. your videos are really helping me learn. thanks so much
Best Pi Tutorial i've seen so far
Today I've got myself a starter kit and this video helped me a lot! Thanks!
Loved your class. Smooth and fast and clear
Glad to hear.
I love these videos, you've done an awesome job with explaining everything that simply that even a beginner understands. Awesome job!
Nice Explanation,Sir.Needs More.
You explain so well, I just had to sub.
Thanks clear and crisp instruction
Great tutorial!
Just wish YT allowed more zoom in.
Not rushed , therefore great video
Great Job instructing. I watched a lot of videos and your very good at showing and explaining and assuming your audience does not have your knowledge base. Nice Job.
wonderfull it worked! there is a lot of projects that failed for me. I will make a plant watering system
Great video for getting started with GPIO. Thank you
Hey I got A question. How can you automatically run a program if you plug the raspberry pi?
Thanks for the vid BurgZerg, I'm super wrapped implemented your suggestion of a traffic light. So cool! Lights today, robotics tomorrow.
Thanks for the tutorial!
Thank you for the great intro!
Thanks dude, this is very useful for a beginner
Thank you helpful
Glad it helped
Thanks for the Great vid! :D Really helped out!
You have just gained a sub
Very clear tutorial. Thanks for the help :)
Thanks for this. Why is it 4 and not 6 or 7?
What a cool dude, like you man
I get a syntax error. I’ve triple checked and all my text looks right. Using Python 3.4.2 on Raspberry Pi3.
Same I got an error
I had a “.” period instead of a “,” comma after the “4”s. No more “Syntax error” but still no blinks... back to it...
Nice raspbery py
Nice tutorial. I love your voice
Interesting... I usually put my resistor on the negative side of the LED. And, with RED ones, I usually use a 1K resistor, because the damn things are so bright it's just a waste of energy to use the full current level. Little extra protection for the controller too.
how do you make it automatically run the script when you turn on the pi?
Thank you!
good explanation
Nice video 👍
This allows me to make it flash faster and faster correct? Like up to 100 times a second.
So I’m trying to light up an led but the problem is when I set the gpio output to true nothing happens. I’ve followed a tutorial exactly and nothing. When I touch the resistor the led does give some light so ik the pi is giving output. Any help? I’m a very new beginner
Who's ready for a slice of Pi?
im am. i want to make my own project from yours but its impossible to find a raspberry pie in Jamaica.
Youbitubical TV can't import them?
yes that's possible but id have to have someone to send it through the mail otherwise i would have to use a third party shipping company and its going to cost a lot more.
+Amin Rouan Serik I think they ship globally.
+Amin Rouan Serik might want to get a few then. I tend to build quite a few things 💩
ty dude u rock
i have did it, but my LED wasn't turn on or blinked. but, my program was running well and print the result. Would you help me to fix it sir? i don't know what's the problem of this. Thank you
Can I use potentiometer instead of color code resistor?
i dont know resistor stuff so lets hope the one i grabbed works :) (this could be bad)
I keep getting the invalid syntax error when I try to run it. Any advice?
Please some one help I did the comma but I still get a syntax error
I am getting the same problem as well.
What is that ide u are using to write the code
How do you make this code loop?
I was thinking how cool it would be if the Raspberry Pi could be used with Unity3D much like the Arduino.
I'm desperately looking for a single or small but fairly powerful computer that can run our Unity3D app.
I know you are pretty familiar with Unity3D have you ever come across a small computer that can run a stand alone Unity 3d build?
I will have a video later this week about it.
Awesome!! I'll be looking forward to that as our project we're working on has a real need for a small computer that can run a unity build. The idea is to put the computer inside of a project box big enough to make an enclosure and then put a mock circuit board on top that has some LED chasers and blinking LEDs under a transparent cover. This is to make our computer look like K.I.T.T.s CPU ;)
Here is a link to what I'm after for my KITT project :)
myknightrider2000.blogspot.ca/2016/01/kitts-cpu-real-possibility.html
If I'm running a Web App deployed on Heroku, how do I make a button on the Web App execute "ledON.py" script so that the LED on my raspberry pi turns on? (Not a local web server, the server is on Heroku)
I'm confused when I run the program it comes up with a syntax error
Do you have a link to a playlist or blog for these Pi tutorial videos? I've seen two of them, but I find all your game dev videos when I try to find the third one.
Oh, found it myself. RUclips UI is much richer and easier to navigate on a PC: Here's a link for mobile users: ruclips.net/video/dDWs7Z34Nu0/видео.html
thanks
im using vmware workstation to run the raspberry pi os. and when im trying to run the code, it stated ImportErroe: No module name 'RPi". do u know how can i solve this?
Question do you need Ethernet cable to upload or do you just need wifi or somthing
Nvm I did it
So when you use TKinter for buttons to activate the blink mode and deactivate the blink mode, if I import time for a delay (time.sleep(1)) will it still function. Because I'm trying to trigger a relay using the same method but it won't turn off unless I deactivate the graphic button manually. What might i be doing wrong?
brother see this toturial.. hope u will understand...
ruclips.net/video/lwVkB9-jozI/видео.html&feature=share&fbclid=IwAR1oQ6CaS70KhtFh0KCRPHjtp2T7FY0972TIoYaFgYxn4UVEcwFX0C8qTEw
Could you include a schematic diagram?
Can someone please explain me what the line:
GPIO.setmode(GPIO.BCM)
Does?
Some people put the resistor after the negative leg. Does anybody know why?
Work with newer models?
It should.
Thx for teaching me should do vid with multiple leds and make them all blink
I have my class do that right after they do this project.
BurgZerg Arcade okie 😄
What is PI stand for ? I just need to know PI LED terms. Thx.
Pi = 3.14.... it is a number.
@@BurgZergArcade thanks a million 🙏🙏🙏🙏
I added a "while True:" loop!
which software used to program pi and can u plz give me a downloading link for that
This is Raspbian
it doesnt work when i try to setup gpio 4
can you do the board?
what is the maximum speed you can get the LED to blink with?
As fast as the CPU can run - that's why he had the time.sleep(delay), because he didn't want flashing the LED to use the whole CPU
Thank you for the video! I was finally able to get my LED to light up. :-) I have some questions, if you would like to answer them: So, connecting to a GPIO Pin like 4 seems to provide 3.3V power. I have seen other scripts that have you connecting to the 3V3 pin, as well as a GPIO Pin like 4. But, that seems unnecessary after using your method of just using the one GPIO Pin. Also, there is a nine-second delay from the time I click "Run Module" and the LED lighting up. Is that the time it takes Python to compile and run? Lastly, I saw in a Sunfounder-provided script the line GPIO.cleanup() to "release GPIO resources." Should I do that and/or is there a statement to end the program? Or, does Python just end when it comes to there being no more code and it ends itself, and releases any called-upon resources. Thank you!
Glad you found it useful. I do not use the 3v3 pin here as the gpio 4 pin gives me enough juice to light the led up. I am not sure why it takes you 9 secons to run the script if you do not have any sleep statements in it. Mine runs in under a second i believe. I use the cleanup in later lesson on python. I like to introduce just what is needed for each lesson instead of throwing a ton at you all at once.
If I want it to keep blinking how would I do that?
If I wanted it to blink for a set number of times, is that possible?
you need to use a for loop
for i in range (0,10000)
GPIO.output(4,True)
Use
while True:
Then tab and write the code
How can you make the LED keep blinking until you stop it? Thanks!
put it in a while loop
while True:
GPIO.output(4, True)
time.sleep(1)
GPIO.output(4, False)
time.sleep(1)
mohamed habib Thanks for the info !!
why led did't blink????...
Hmm I have a arduino too and the shell Is simple but raspberry pi is great because it's python not c++
Well, you are definitely young at heart. HAHAHA. More videos for us, the illiterate, please!!!
this comment is a little late although i would appreciate it if someone could help me out with an error i've been getting. When trying to run the python code, there is an import error that says, "No module named 'RPI'. My code is set up exactly as it is in the video and the error seems to be on line 3.
Ok i'm editing the comment now, i may have 2 problems... i don't know how, i didn't do anything although now the LED is on but it wont turn off. It's just... on.
what did you do to get rid of the no module named rpi error??
I have error on line 6, which is “GPIO.setup(4, GPIO.OUT)”
I need help please.
I have the same problem. Something about a syntax error.
Likewise
GPIO.setup(7,GPIO.OUT)
GPIO.output(7,True)
time.sleep(2)
GPIO.output(7,False)
bcoz output pin is 7
Hey Mr BurgZerg, i keep getting syntax error. Coping coding exact same etc but wont run the program. Any help pls?
I got a pi 2
please give source code?
It is faster to type the 8 lines of code then to download them...
BurgZerg Arcade than*
Please also, don't ever add drug music to your vids
Please turn off autofocus next time ;) It's messing with my eyes. Great video otherwise.
dislike for staring music