Raspberry Pi Robotics #1: GPIO Control
HTML-код
- Опубликовано: 23 июл 2024
- In this video I explain how to connect LEDs to a Raspberry Pi's general purpose input-output (GPIO) pins, and how to write Python code to turn them on and off. My next video then builds on this foundation to control a motorized robot, and can be found here: • Raspberry Pi Robotics ...
This video assumes some knowledge covered in my "Setting Up a Raspberry Pi" video: • Setting Up a Raspberry Pi
Note that this tutorial will work with both a Raspberry Pi Model B, as well as the newer Model B+ (on which I will do a video shortly!).
You can find the wiring diagrams, as well as links for the components used in my Raspberry Pi robotics videos here: explainingcomputers.com/rasp_p...
More videos on computing and related topics can be found on my RUclips channel at: / explainingcomputers
You may also enjoy my other channel at: / explainingthefuture
I'm 70 years old, and I just started learning Python to use in some home automation projects.
I've been watching your videos for years now, but I just wanted to say how very well done this entry level tutorial was.
The two basic examples were so perfect for those like me just starting out.
Here I am 70 and felt like I was like a kid with my Raspberry Pi flashing 4 LEDs (Yes I went extreme). And couldn't wait to show it off to other family members. They unfortunately didn't really see the true value in what I had just created, but they never see that in any of my gadget creations. LoL
Anyway Thank You so very much for this most Excellent Tutorial. You just made my day brighter.
This is great to hear. :)
family members never understand the value of 4 flashing leds
@@RainbowSheep_was_taken at true. My daughter is like "Dad what's the big deal of 4 flashing lights?". I started to explain the fact that everything is run by tiny circuits like this. Response was her eyes rolled=Error- does not computer.. LoL
@@Musicman-50 lol
Love the way you teach. Thank you for breaking it down so I can learn what's happening rather than copying someone else and not really know what's going on.
This is actually so cool. I was always wanted to learn how to use software to control hardware.
Very in depth and made easy to understand. I really appreciate how you don't just put the commands in instead you explain what they are and why unlike many other youtubers.
I use C# to develop for Pi, but Python really finds it's way of impressing any programmer, especially when such professional instructor presents it. Thank you, great man!
have to say, you're a fantastic teacher. Keep up the good work!
That was really well explained, one of the best tutorials ive seen.
You just earned a subscriber! I understood everything you said. Great video! (I am 9 years old and am using my dad's account with his permission in his presence). I now program in Java but your video made me go nuts on Python.
Naveed Excellent. Python is a fun language. Keep programming!
now u r 13 and mee too
As a fellow educator, nice work. This made things very easy to understand and not only covered some good parts of coding but also helped immensely with very basic setup of initial hardware which is appreciated.
Fantastic.
I'm completely new to ok, and managed to follow the video, had a few hiccups with capital letters giving me syntax errors, but muddled through.
And! Made a traffic light setup too.
Thank you so much for this
You are an amazing teacher, very easy to follow your video, you don,t make it difficult compare to other people's videos
print "true."
jerry richard star!!!
@@CrypticConsole def true? Or else
@@0dyss3us51 lol
@@0dyss3us51
def true() :
print("true.")
Really excellent. Other videos / explanations don't convey information this clearly and they are heaps of fun to watch. KEEP UP the great work!
An excellent tutorial on using the Pi and GPIO. I reviewed most of the videos on covering this topic and your video tied with one video other clarity and conciseness. I would recommend this tutorial to anyone interested in using the Pi and GPIO.
Fantastic Job. i was tinkering with the idea of getting a PI and your style of instruction has sold me on it. Thanks.
Been dabbling in code for years in and off and never really got stuck in. This is the first time everything has lined up and made sense, thank you so much
i know im asking the wrong place but does anybody know a method to log back into an Instagram account?
I stupidly forgot the login password. I would appreciate any assistance you can offer me.
@Frederick Terrence instablaster =)
35 years, man. If people kept their stuff in order and functioning like you do, we would have a lot less waste on the planet 👌👍
Thanks for this. I've had my pi laying around for years and am finally getting into it again.
I liked how you first created a program to print on and off, then manipulated that to control the motor. It made it really easy for me to understand. Good job.
Chris I have been follwing your channel for some time. Your videos are well produced, concise, clear, and comprehensive. You are a great teacher. Thank you so much for your endeavours. I look foward to each new video you produce.
Best programming video I’ve ever seen! I was working on trying to do this for hours! I finally figured it out because of you! Thank you so much!
Excellent!
I'm a rank beginner at all of this, never programmed, never made a circuit and I cannot state enough how satisfying it was watching that little LED flash on and off. Thank you!
How has your skills evolved during the past 10 months? Have you built your custom mechanical keyboard yet?
Well done my friend! I finally got a project to work after watching your video. It is extremely educational and well put together. i'm looking forward to another project. Thank's for your time.
Please do more of these videos as i think that a lot of people (including me) will learn many things and are going to be inspired in the process.
Great video!!!! Really simple and thank you for explaining every line, it help immensely
learning python as my first language, and just found out about raspberri pi...then found your videos. Mind blown. :D Always thought robotics was out of reach, but now i'm ridiculously excited
Wonderful! :) Do checkout my fairly recent video on Raspberry Pi GPIO inputs. There is a quite a bit of Python coding in that. And I will soon do some more video on the robotics stuff.
You r like BUDDHA who explains difficult stuff with complete ease. You and your tutoring is great.
I have been considering getting a RPi for a few weeks and looked at a number of beginners tutorials.
Hands down you are the best at explaining what you are doing.
Put it this way, I now understand what 'sudo' means.
These basic pieces of info are paramount to learning the language.
Many thanks, your newest subscriber.
ZP
Thanks for this, and for the sub.
@@ExplainingComputers Thanks for the amazingly educational content! :-)
your the best starter/noobs teacher I've been able to refer to
Thanks.
Thanks a lot for that! I always lacked the basic knowledge of this stuff, and it's good to get a nice taste of them!
Thanks for a great tutorial! Very easy to follow, and quite informative. Much appreciated.
Best tutorial I have seen in a long time tbh
I agree with many others with the notion that you are an excellent teacher, I enjoy all of your content and have learned a great deal of quite useful infomation as well. With my first comment I would like to thank you very much for your densely informative content.
Thanks.
Thank you for posting this. Such a clear description. I've been learning Python for the last month so I can start playing with my Raspberry Pi and this is the first time that I've got the code to do something in "the real world". As an adult who has been interested in robotics all his life but never got into it, until recently, this is a momentous occasion for me and I just wanted to share that with you.
Thanks for sharing -- I too found it amazing the first time I managed to interface programming and electronics. It changes how you relate to computing! You may find interesting my second two Pi robotics videos, and also this one looking at GPIO inputs: ruclips.net/video/NAl-ULEattw/видео.html
Inspiring and accessible.
Just finished duplicating this video at home, I was that motivated. And now empowered. Much appreciated!
Excellent -- great to hear that you followed this through! You may also like the follow-up on using Raspberry Pi inputs (one of my own favourites): ruclips.net/video/NAl-ULEattw/видео.html
Thank you for the very clear explanation without blah-blah as the most videos on RUclips.
what a marvelous video, a very crystal clear instructions. excellent job my good sir.
Best RPi gpio video on RUclips. Keep up the good work please!
Really very well explained. God Bless!! (waiting for my pi 3 to arrive )
I've just bought my first Raspberry Pi which was going to be entirely for computing use but having watched your video, I have now got myself a breadboard, resistors, LEDs, and have managed to get this LED tutorial working really well.
Thanks for the excellent and clear instructions!
PJ1004 Excellent! There are so many things you can do with a Raspberry Pi. And the more you experiment, the more possibilities present themselves. :)
+PJ1004
You have just entered the world of robotics, automation and control systems. I hope you continue with your adventure.
I am an absolute beginner and this video has helped me a lot. Great explanation, thank you!
Chris, thank you for the great video and the detail involved, I am not only looking for information I am also looking for education. I think many folks may expect too much out of the Raspberry Pi, I think it is just a starting point for greater things to come. I would rather learn this information in the manner you teach.
Always grateful for your time and effort, some of your videos are very time consuming to make, you do a great job!
Moonpie
Thanks for your kind feedback as always. :) I agree that the Raspberry Pi is primarily a learning tool, and it is that spirit that I have made videos about it. I find the Pi fascinating as a bridge between electronics and programming. In many ways, while computers are now incredibly powerful and useful -- eg as video production and communications tools -- they are less interesting than they were 20+ years ago when many users programmed them and understood them as more than magical boxes.
Hey Chris! Really great stuff. You got me interested in Raspberry Pi and all the things that you can do with it. So being a totally new to the coding world and just a little bit of experience with electronics, i ordered RasPi and now using your videos as a source to my new projects. You are the Governor! Keep up the excellent work!
Excellent! :)
This is the only GPIO that I could understand. Thank you for this!
This is the raspberry pi video everyone is looking for! Thanks. I wish someone would create the same video programming with mathematica.
While watching I've learned python my main thing was wondering how everything lined up but you explained it well thank you.
Excellent presentation and simple to understand!
Excellent video. You ROCK! Well done and THANK YOU for taking the time and for making a difference.
Your gift for instructing is very unique... Amazingly easy to follow. Nice
Thanks a lot 😊
Why have I overlooked the abilities of the pi besides retro gaming? Thank you great tutorial!
Great Vid for this beginner. This has really helped me out. Thanks!!!
Excellent videos - I'm a big fan. It would be amazing if you did the basics of electricity leading up to electrical engineering
Excellent teacher, thankyou so much for sharing your knowledge in such an easy to follow and concise way 👍
A very clear explanation. Worked on my first attempt. You have renewed my interest in raspi. Thankyou
Great to hear! :) You may be interested in my Pi GPIO inputs video: ruclips.net/video/NAl-ULEattw/видео.html
ooooh Chris.. this is the old man again... the deeper I get into your old videos the more confident I am that I can still do this.. even with my diminishing mental abilities I think I can! you have given new life to an old man... this is like the old days eh.. with the trs 80's and pre IBM machines... The days when everything was possible it was just a matter of getting the coding right.. I am excited I can even afford to do this too.. it is always hard on a fixed income to afford to do new things.. plus it seems like nothing is new in old age.. but old things are exciting at times... thanks Chris.. you will probably not ever see this since the vid is so old..But I do thank you..
I have seen this! :) And you are right, experimenting with single board computers has the same feel to how computing used to be. Learning how to set them up and make them do stuff is very rewarding. And I know from my RUclips comments that many older people have taken up an interest in SBCs. You may enjoy this video: ruclips.net/video/NAl-ULEattw/видео.html
thanks my friend after I watch your Rasp pi 3 b+ vid (I am watching on my other screen) I will watch this one...
Don’t put limitations on yourself. If you can understand these basic steps you can build upon it, and nothing will be out of reach. Think of python as just an expanded version of the old ms basic and you’ll do fine.
Age is just a state of mind.
interesting tutorial bcoz of ur amazing speaking way...
Another subscriber you just earned for such a wonderful teaching
Thanks. Welcome aboard. :)
Awesome way of explaining things...
Amazing Teacher... i hope i will meet you one day... LOVE FROM PAKISTAN
Another great tutorial completed. The only snag I incorporated was because I used 470 ohm resistors and not the 220 ohm as stated. Once I changed the resistors to the correct value given "hey presto" the light show commenced. I assumed that the resistance value was too high and would not allow the signal form the Raspberrypi to output and complete the circuit.
Fantastic presentation. Thank you.
I can’t believe a Pi can do this much! Awesome video :)
Amazing! It was easy to follow trough and i learned something!
Great video, it was my first coding with a raspberry pi, you made it very clear and very easy to understand: GREAT job!!
+Baptiste Sauvage Excellent. Look out for my GPIO inputs video fairly soon now. :)
I have my robot built - now I will have to study your videos so I can learn to code. Thank you for all the information you provide in your videos.
Great to hear!
thank you and you are very an amazing teacher and you clearly explanation.
This is fantastic! Really great explanation with marvellous use of screen shots, photos and diagrams. THANK YOU!!! I'm a high school teacher in Sydney, Australia and will be directing my students directly to this. They'll love it. Keep up your great work.
+Michael Thill Many thanks. In a few weeks I'll be posting a follow-up video about using the GPIO pin as inputs.
Congratulation. You're a briliant constructor. The clearest and more understandable video i've ever seen. I'm gonna use it in my class.
Thanks. You may also like my similar video on GPIO inputs: ruclips.net/video/NAl-ULEattw/видео.html
Since so many I was searching for a teacher in robotics and finally found great one
Watch tomorrow's video. :)
Raspbian has really come a long way since the first raspberry pi, pretty amazing
So true.
as a programming beginner this is SUPER helpful, thsnks!
You are extremely good. Please don't stop
You have no idea how long I've been looking for this video without knowing it
Excellent! You may also like the one I did on using GPIO inputs: ruclips.net/video/NAl-ULEattw/видео.html
Thank you, Mr. Barnatt! Great video, I got quite a a sense of accomplishment once I completed this project. On to the next one!
paganone Excellent! I remember being happy when the LEDs came on myself! :)
Great Video! I was looking for a quick intro to the software side with RPi.GPIO, this was perfect. New sub!
Thanks for the sub. You may also find useful my video on the 'output' side of things: ruclips.net/video/NAl-ULEattw/видео.html
Just Awesome.. Perfect for beginners in Electronics like me. :D
I really like watching your videos
Good basic tutorial. Please come up with more tutorials like these.
There are several on this channel -- eg: ruclips.net/video/NAl-ULEattw/видео.html
I Enjoyed this video very much! I am getting a Rpi B+ and parts kit as a late Christmas gift. It will have LEDs, motors, switches and buttons etc. I am looking forward to getting it and experimenting with the examples you showed in the video.. Thank you again for making it..
I learnt in 15 minutes what I did not do in a book of 500 pages, thank you!
Such a brilliant tutorial. Subscribed
Welcome aboard!
Very Nice Production work!
I love this dude! Not only is he an excellent instructor but funny as well--and he reminds me of John Lennon too!!
Great to the point tutorial. Thank you :)
Great video really clear, this also works for a b+ module in case your wondering. Thanks.
Thanks for your kind feedback.I tried it with the Model B+ only this week, only with some more LEDs! Raspberry Pi Model B+ :)
Well done, sir! I have been using RPi in a Chemical Instrumentation class for a few years. I have wanted to use RUclips videos for students, but the dozens of "light up an LED" videos all bring in unrelated content (GMAIL BOX? Really?) that complicate the focus of the lesson. You do a good job of both explaining each required step (importing the time library) and NOT adding spurious factors (as cool as they may be) as distracting bling. Good job!
How can 3 flashing LEDs be so exciting. Explained in a very clear and understandable manner. Thanks
Great tuturial. Great Job!
Fantastic! Easy setup and concise instructions. You mashed up some of my current interests all at once, raspberry pi, Python programming, and LEDs. Looks fun. Now do it for 1000 LEDs and try to get them to spell flash, "Like a Boss." Hahaha Thanks!
Thank you this video was most helpful.
Awesome tutorial :) Thanks
Thank you very much sir!
This was very easy to understand.
Best regards,
Harvey
Thanks Harvey.
Well explained...and interesting..
his tutorials are very good
keep it up sir.
Thank you, I will. :)
That was amazing basic steps.Thanks alot.🤗🤗🤗
Excellent tutorial...thanks
Thank you for this very good video
I wonder if the code could be optimized for event-driven style programming.
very helpful and easy to understand thank you
Thank you so much! This video helped out a lot.
very clear explanation. Thank you so much.