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

Комментарии • 116

  • @ericdunn9001
    @ericdunn9001 7 лет назад +19

    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.

    • @BurgZergArcade
      @BurgZergArcade  7 лет назад +3

      Eric Dunn thank you. I am trying to get 1 a day up.

  • @donschenck2466
    @donschenck2466 Год назад

    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!!!

  • @ny2002jk1
    @ny2002jk1 5 лет назад

    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.

  • @oxyLuna
    @oxyLuna 3 года назад +1

    This is so much easier to understand than the others I tried. Thank you.

  • @rluxon
    @rluxon 4 года назад

    just got a Pi3 as a gift. enjoying the play with it. your videos are really helping me learn. thanks so much

  • @bredebo123
    @bredebo123 7 лет назад +1

    Best Pi Tutorial i've seen so far

  • @JS-jq8pu
    @JS-jq8pu Год назад

    Today I've got myself a starter kit and this video helped me a lot! Thanks!

  • @vishalkhanna1223
    @vishalkhanna1223 3 года назад +1

    Loved your class. Smooth and fast and clear

  • @dayrudehd8876
    @dayrudehd8876 7 лет назад +2

    I love these videos, you've done an awesome job with explaining everything that simply that even a beginner understands. Awesome job!

  • @mithunshaha4342
    @mithunshaha4342 Год назад

    Nice Explanation,Sir.Needs More.

  • @ToiletCode
    @ToiletCode 6 лет назад +1

    You explain so well, I just had to sub.

  • @dbk9555
    @dbk9555 3 года назад

    Thanks clear and crisp instruction

  • @Alan_1
    @Alan_1 Год назад

    Great tutorial!
    Just wish YT allowed more zoom in.

  • @zahidrahman2427
    @zahidrahman2427 3 года назад

    Not rushed , therefore great video

  • @snydermike22
    @snydermike22 7 лет назад

    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.

  • @hyone4019
    @hyone4019 2 года назад

    wonderfull it worked! there is a lot of projects that failed for me. I will make a plant watering system

  • @kslabdiy9379
    @kslabdiy9379 7 лет назад

    Great video for getting started with GPIO. Thank you

  • @benlapuhapo7696
    @benlapuhapo7696 4 года назад +2

    Hey I got A question. How can you automatically run a program if you plug the raspberry pi?

  • @fortuneflux
    @fortuneflux 7 лет назад

    Thanks for the vid BurgZerg, I'm super wrapped implemented your suggestion of a traffic light. So cool! Lights today, robotics tomorrow.

  • @christophersmith2074
    @christophersmith2074 5 лет назад +1

    Thanks for the tutorial!

  • @nicholascm
    @nicholascm 6 лет назад +1

    Thank you for the great intro!

  • @xaviershowrn462
    @xaviershowrn462 6 лет назад

    Thanks dude, this is very useful for a beginner

  • @jayshastri2706
    @jayshastri2706 3 года назад +1

    Thank you helpful

  • @PossumMedic
    @PossumMedic 5 лет назад +1

    Thanks for the Great vid! :D Really helped out!

  • @jackhorder6307
    @jackhorder6307 7 лет назад

    You have just gained a sub

  • @rockleaf1238
    @rockleaf1238 6 лет назад

    Very clear tutorial. Thanks for the help :)

  • @asad5986
    @asad5986 4 года назад +1

    Thanks for this. Why is it 4 and not 6 or 7?

  • @demoncloud6147
    @demoncloud6147 5 лет назад

    What a cool dude, like you man

  • @LimitlessHealth
    @LimitlessHealth 4 года назад +1

    I get a syntax error. I’ve triple checked and all my text looks right. Using Python 3.4.2 on Raspberry Pi3.

    • @bo55-jsr
      @bo55-jsr 4 года назад

      Same I got an error

    • @LimitlessHealth
      @LimitlessHealth 4 года назад

      I had a “.” period instead of a “,” comma after the “4”s. No more “Syntax error” but still no blinks... back to it...

  • @andrejprenkelushaj9499
    @andrejprenkelushaj9499 3 года назад

    Nice raspbery py

  • @ENTIZStdio
    @ENTIZStdio 7 лет назад

    Nice tutorial. I love your voice

  • @jasmine2501
    @jasmine2501 5 лет назад

    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.

  • @autisticboi2992
    @autisticboi2992 6 лет назад +1

    how do you make it automatically run the script when you turn on the pi?

  • @CanalDoFilipe_
    @CanalDoFilipe_ 7 лет назад

    Thank you!

  • @ravishrawattech
    @ravishrawattech 6 лет назад

    good explanation

  • @rugvedasarambale2083
    @rugvedasarambale2083 5 лет назад

    Nice video 👍

  • @thatmcgamer3106
    @thatmcgamer3106 4 года назад

    This allows me to make it flash faster and faster correct? Like up to 100 times a second.

  • @tkg565
    @tkg565 4 года назад

    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

  • @BurgZergArcade
    @BurgZergArcade  7 лет назад +18

    Who's ready for a slice of Pi?

    • @YoubitubicalTV
      @YoubitubicalTV 7 лет назад

      im am. i want to make my own project from yours but its impossible to find a raspberry pie in Jamaica.

    • @BurgZergArcade
      @BurgZergArcade  7 лет назад

      Youbitubical TV can't import them?

    • @YoubitubicalTV
      @YoubitubicalTV 7 лет назад

      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.

    • @BurgZergArcade
      @BurgZergArcade  7 лет назад

      +Amin Rouan Serik I think they ship globally.

    • @BurgZergArcade
      @BurgZergArcade  7 лет назад

      +Amin Rouan Serik might want to get a few then. I tend to build quite a few things 💩

  • @nicolaschollet7435
    @nicolaschollet7435 6 лет назад

    ty dude u rock

  • @vinsensiaelzanorasimbolon1409
    @vinsensiaelzanorasimbolon1409 2 года назад

    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

  • @PrecisiveCreed
    @PrecisiveCreed 6 лет назад

    Can I use potentiometer instead of color code resistor?

  • @bucketman5138
    @bucketman5138 4 года назад

    i dont know resistor stuff so lets hope the one i grabbed works :) (this could be bad)

  • @imandumpert5546
    @imandumpert5546 6 лет назад +4

    I keep getting the invalid syntax error when I try to run it. Any advice?

    • @cooperpeloquin8422
      @cooperpeloquin8422 6 лет назад

      Please some one help I did the comma but I still get a syntax error

    • @LiamDarden
      @LiamDarden 5 лет назад

      I am getting the same problem as well.

  • @hrishikesheb9805
    @hrishikesheb9805 4 года назад

    What is that ide u are using to write the code

  • @DeviousMark
    @DeviousMark Год назад

    How do you make this code loop?

  • @KnightRiderGuy
    @KnightRiderGuy 7 лет назад

    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?

    • @BurgZergArcade
      @BurgZergArcade  7 лет назад +1

      I will have a video later this week about it.

    • @KnightRiderGuy
      @KnightRiderGuy 7 лет назад

      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

  • @rajkopodinic
    @rajkopodinic 5 лет назад

    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)

  • @Connor_Mcclean
    @Connor_Mcclean 3 года назад

    I'm confused when I run the program it comes up with a syntax error

  • @EivindGussiasLkseth
    @EivindGussiasLkseth 7 лет назад

    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.

    • @EivindGussiasLkseth
      @EivindGussiasLkseth 7 лет назад

      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

  • @amirmarjohan1856
    @amirmarjohan1856 6 лет назад

    thanks

  • @afeeqhumphries7792
    @afeeqhumphries7792 5 лет назад

    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?

  • @randomtech3749
    @randomtech3749 5 лет назад

    Question do you need Ethernet cable to upload or do you just need wifi or somthing

  • @yapandasoftware
    @yapandasoftware 5 лет назад

    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?

    • @qamarjaafri3639
      @qamarjaafri3639 5 лет назад

      brother see this toturial.. hope u will understand...
      ruclips.net/video/lwVkB9-jozI/видео.html&feature=share&fbclid=IwAR1oQ6CaS70KhtFh0KCRPHjtp2T7FY0972TIoYaFgYxn4UVEcwFX0C8qTEw

  • @rsc8295
    @rsc8295 2 года назад

    Could you include a schematic diagram?

  • @PALADiNFiLSBALL
    @PALADiNFiLSBALL 5 лет назад

    Can someone please explain me what the line:
    GPIO.setmode(GPIO.BCM)
    Does?

  • @guillermoperez8250
    @guillermoperez8250 5 лет назад

    Some people put the resistor after the negative leg. Does anybody know why?

  • @camaronruss9476
    @camaronruss9476 3 года назад

    Work with newer models?

  • @skeliphacks
    @skeliphacks 4 года назад

    Thx for teaching me should do vid with multiple leds and make them all blink

    • @BurgZergArcade
      @BurgZergArcade  4 года назад +1

      I have my class do that right after they do this project.

    • @skeliphacks
      @skeliphacks 4 года назад

      BurgZerg Arcade okie 😄

  • @abazaabdelmageid774
    @abazaabdelmageid774 4 года назад

    What is PI stand for ? I just need to know PI LED terms. Thx.

  • @ragulmanday1539
    @ragulmanday1539 6 лет назад

    I added a "while True:" loop!

  • @vigneshcbrt2087
    @vigneshcbrt2087 5 лет назад

    which software used to program pi and can u plz give me a downloading link for that

  • @bucketman5138
    @bucketman5138 4 года назад

    it doesnt work when i try to setup gpio 4

  • @lycoris2831
    @lycoris2831 5 лет назад

    can you do the board?

  • @rumbidzaichimhande1421
    @rumbidzaichimhande1421 7 лет назад

    what is the maximum speed you can get the LED to blink with?

    • @thecadencer
      @thecadencer 4 года назад

      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

  • @trainsplanesmore
    @trainsplanesmore 7 лет назад

    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!

    • @BurgZergArcade
      @BurgZergArcade  7 лет назад

      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.

  • @jaider9579
    @jaider9579 6 лет назад +1

    If I want it to keep blinking how would I do that?

    • @jaider9579
      @jaider9579 6 лет назад

      If I wanted it to blink for a set number of times, is that possible?

    • @charlottephilips7179
      @charlottephilips7179 6 лет назад +1

      you need to use a for loop
      for i in range (0,10000)
      GPIO.output(4,True)

    • @rotatingdiscohorsehead3143
      @rotatingdiscohorsehead3143 5 лет назад +1

      Use
      while True:
      Then tab and write the code

  • @kenstovall5091
    @kenstovall5091 5 лет назад

    How can you make the LED keep blinking until you stop it? Thanks!

    • @sanddevelopers
      @sanddevelopers 5 лет назад

      put it in a while loop
      while True:
      GPIO.output(4, True)
      time.sleep(1)
      GPIO.output(4, False)
      time.sleep(1)

    • @kenstovall5091
      @kenstovall5091 5 лет назад

      mohamed habib Thanks for the info !!

  • @sivagamishanmugam9101
    @sivagamishanmugam9101 6 лет назад

    why led did't blink????...

  • @randomtech3749
    @randomtech3749 5 лет назад

    Hmm I have a arduino too and the shell Is simple but raspberry pi is great because it's python not c++

  • @sinabastami
    @sinabastami 4 года назад

    Well, you are definitely young at heart. HAHAHA. More videos for us, the illiterate, please!!!

  • @joeybolton9995
    @joeybolton9995 6 лет назад

    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.

    • @siddragon5
      @siddragon5 6 лет назад

      what did you do to get rid of the no module named rpi error??

  • @calebkilgo6666
    @calebkilgo6666 5 лет назад

    I have error on line 6, which is “GPIO.setup(4, GPIO.OUT)”
    I need help please.

    • @LiamDarden
      @LiamDarden 5 лет назад +1

      I have the same problem. Something about a syntax error.

    • @Cornet_Tooter
      @Cornet_Tooter 5 лет назад

      Likewise

    • @swatigupta4014
      @swatigupta4014 4 года назад +1

      GPIO.setup(7,GPIO.OUT)
      GPIO.output(7,True)
      time.sleep(2)
      GPIO.output(7,False)
      bcoz output pin is 7

  • @marcomugz1
    @marcomugz1 6 лет назад

    Hey Mr BurgZerg, i keep getting syntax error. Coping coding exact same etc but wont run the program. Any help pls?

  • @zeketheerror404filenotfoun2
    @zeketheerror404filenotfoun2 5 лет назад

    I got a pi 2

  • @devigavenkatesan5141
    @devigavenkatesan5141 6 лет назад

    please give source code?

    • @BurgZergArcade
      @BurgZergArcade  6 лет назад

      It is faster to type the 8 lines of code then to download them...

    • @neoney
      @neoney 6 лет назад

      BurgZerg Arcade than*

  • @randomtech3749
    @randomtech3749 5 лет назад

    Please also, don't ever add drug music to your vids

  • @jordanmoorman5024
    @jordanmoorman5024 6 лет назад

    Please turn off autofocus next time ;) It's messing with my eyes. Great video otherwise.

  • @mr.anonymous298
    @mr.anonymous298 4 года назад

    dislike for staring music