Тёмный

Raspberry Pi: Using GPIO Inputs 

ExplainingComputers
Подписаться 1 млн
Просмотров 581 тыс.
50% 1

How to connect physical switches, reed switches and an Adafruit IR reflectance sensor to any Raspberry Pi and communicate with them using Python. I also explain in depth the concept of pull-up and pull-down resistors.
You can access all of the code and circuit diagrams featured in this video here: www.explainingcomputers.com/pi...
The Adafruit IR reflectance sensor can be obtained from Adafruit in the USA here: www.adafruit.com/product/2349 -- or from Pimoroni in the UK here: shop.pimoroni.com/products/re...
You may also like my videos on Raspberry Pi robotics, such as this one in which I explain how to use GPIO inputs: • Raspberry Pi Robotics ...
I also have a playlist of Raspberry Pi cooling videos here: • Raspberry Pi 3 Cooling
Some of my other Raspberry Pi videos include this one where I spend a whole week using a Raspberry Pi as my only computer: • Pi Week: Raspberry Pi ...
More videos on computing-related topics can be found at: / explainingcomputers
You may also like my ExplainingTheFuture channel at: / explainingthefuture

Наука

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

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 424   
@tav9755
@tav9755 3 года назад
YT is pure gold as long there are people like you explaining stuff.
@ExplainingComputers
@ExplainingComputers 3 года назад
Thanks.
@heartikcurlz9041
@heartikcurlz9041 3 года назад
Indeed! Love from india💓
@griffinbrooks6748
@griffinbrooks6748 3 года назад
I agree :)
@trondknudsen6689
@trondknudsen6689 2 года назад
I will switch to a YT alternative in a heartbeat when my favourite channels do.
@thomascott7425
@thomascott7425 7 лет назад
Mister Barnett, I must say that I've never heard the concept of pull up / down resistors explained so clearly and concisely. Very well done. You have given me an idea on how to build an alarm system to see if anyone has opened a door or window remotely and to activate a video recorder to stream the output to my smart phone. Now all I have to do is to figure out the streaming bit to my phone. Thanks.
@liudas000
@liudas000 4 года назад
@Bus 22 I'm thinking about same idea, but over sms. I think its possible to write code for arming system by sms or online and to get alerts over sms or watch sensors status online.
@evilMaid1984
@evilMaid1984 4 года назад
May want to look into an ESP8266; programmable with arduino, lower power consumption and a fraction of the cost ;). Works great for door / windows sensors etc...
@walts555
@walts555 8 лет назад
I like your teaching method of suggesting the simplest solution and patching its shortcomings, like what you do for pull-up/down. Very effective. Good work!
@marks_02
@marks_02 2 года назад
Wow, wow, wow, just wow. I'm blown away by how clearly, thoroughly, and yet concisely you are able to teach. I probably gave you a thumbs-up when I first watched this video, but as I watch it again for review 5+ years later, I'm just blown away by how great of a job you did on this one. Thank you!!
@Adam-yl3gi
@Adam-yl3gi 7 лет назад
Thank you. I'm fairly proficient with Arduino's and electronics. I've been looking for some straight-forward examples of using the Raspberry Pi as I would like to harness more powerful boards. Many videos waste lots of time talking about irrelevant things; you've cut straight to some actual examples and it's absolutely brilliant. Subscribed!
@williamheckman4597
@williamheckman4597 7 лет назад
This tutorial rocks. Thanks! GPIO wasn't too clear to me, but now I "Get it" ... Thanks again... great videos!
@ExplainingComputers
@ExplainingComputers 7 лет назад
Many thanks. :)
@Mr.P539
@Mr.P539 4 года назад
just this year I heard about this raspberry pi, it has been hanging around for years already. I'm glad that there still free video like this to learn. Thank you.
@siliconstate
@siliconstate 8 лет назад
This is brilliant, thanks for the guide! As you say, all sorts of projects could be derived from these!
@AgeingBoyPsychic
@AgeingBoyPsychic 5 лет назад
Your enthusiasm is contagious, I wish I'd had an I.T. teacher like you at school!
@jeremyadair5780
@jeremyadair5780 5 лет назад
Heh, Thank you, I never truely knew what floating was in my undergrad, I just knew the pins had to have a pull up or pull down to complete the circuit. I never thought of the protection! You explained it with a circuit and that I can understand. Thank you.
@MrKbtor2
@MrKbtor2 4 месяца назад
Best explanation I've seen yet. I was seeing those terms like "pull-up/down" in the kits I was working with and struggled with understanding the problems and risks.
@khomotjomodipa6798
@khomotjomodipa6798 8 лет назад
You are simply the best at explaining. Thank you.
@truePitch1
@truePitch1 6 лет назад
Pure information - invaluable in today's world. Extremely clear, concise, excellent productions. Kudos.Thanks
@Hermiel
@Hermiel 8 лет назад
That might be the simplest and clearest explanation of pull -up and -down resistors I've come across.
@ExplainingComputers
@ExplainingComputers 8 лет назад
Many thanks! :)
@eebaker699
@eebaker699 4 года назад
Agreed!
@jamesbarker6373
@jamesbarker6373 6 лет назад
I like how you show a variety of circuit diagrams to help understand
@karimkohel3240
@karimkohel3240 5 лет назад
thank you for such a simple and comprehensive tutorial, which helps new comers understand basics that aren't found easily
@Timmeh7
@Timmeh7 6 лет назад
Thanks for this excellent tutorial. While I'm a competent programmer, any discrete electronics knowledge I had fell out of my head 10+ years ago - this was perfect to give me everything I need to actually get back into it.
@ExplainingComputers
@ExplainingComputers 6 лет назад
Thanks.
@OttosTheName
@OttosTheName 6 лет назад
Glad I decided to bingewatch your videos on SPC's, I was just about to mess with buttons and GPIO on my ESP8266 and I had never heard of pull up and pull down resistors. Great explanation for electrobics noobs!
@ExplainingComputers
@ExplainingComputers 6 лет назад
Thanks for watching. :)
@skyzifero8548
@skyzifero8548 5 лет назад
amazing job. Only video I've seen that actually explains the how and why bits in simple terms. Very high quality content; exactly what I needed to understand GPIO. Great teacher, and great skills. Subscribed.
@dylandowdy3687
@dylandowdy3687 4 года назад
This is a great video thank you! I think I was just as stoked about the open and close when it scrolled on screen as you were! Computers rule!
@B.I.T.E.
@B.I.T.E. 5 лет назад
Oh wow.. This is so awesome! Please continue this type of explaining of builds. Without anyone next to me in normal class to ask questions of. This is by far the next best thing. I wish I could hit a subscribe on you tube to send money for your great efforts. You have not set with in RU-vid.
@DLiberator78
@DLiberator78 8 лет назад
Another great Raspberry Pi video. It's interesting to see the sorts of projects you could make with the GPIO pins.
@ExplainingComputers
@ExplainingComputers 8 лет назад
There are indeed so many possibilities when you add switches to something with computing power . . .
@saadzaghloul9279
@saadzaghloul9279 7 лет назад
could you do a video about the GPIOs of Tinker Board from Asus ? it is more interesting in my opinion. thank you.
@Kevin-wo3kp
@Kevin-wo3kp 8 лет назад
Thank you - this is exactly the kind of Pi video I needed to see. I'll be jolly glad to see anything more on the Pi. You set the standard that others can only follow. I wish you a great week.
@ExplainingComputers
@ExplainingComputers 8 лет назад
Thanks Kevin. :)
@slogmue1401
@slogmue1401 8 лет назад
Another great video! I recently completed a school A-level project using a raspberry pi, and your videos were, and still are a valuable resource to me when making that project! Your videos are so easy to understand, and basically taught me the more useful stuff a pi can do, so, thanks a bunch for the great videos!
@ExplainingComputers
@ExplainingComputers 8 лет назад
Many thanks. :)
@resrussia
@resrussia 8 лет назад
Thanks for another awesome video, I generally like your videos, andI love your videos on GPIO. Keep up the good work.
@natsumik5716
@natsumik5716 5 лет назад
it's a shame to say that, as a student who just started learning python, i did not understand well during my class. But watching your lesson helped me a lot ! Thank you so much!
@eebaker699
@eebaker699 4 года назад
Fantastic video! I too have never been really able to understand what and how the pull up and pull down do and work. I appreciate your tip on the safety current limiting resistor going into the GPIO pin. I like your coding work as well. You have eloquently explained this... Thanks again for your excellent video! More Raspberry pi project videos like this one please.
@jonassteinberg3779
@jonassteinberg3779 2 месяца назад
Have to do a bit of microcontroller engineering at work and this video is a relieving primer -- thank you for this crisp exposition.
@scyther1141
@scyther1141 8 лет назад
Nice job. The explanation and graphic are very easy to understand.
@Bengismo
@Bengismo 6 лет назад
Great video, well explained with a good coverage of the electronics and why to add resistors as well as what the phython code does, Excellent.
@TheEpjim
@TheEpjim 7 лет назад
Great video! Very informative! Keep up the good work!
@dowonkim574
@dowonkim574 6 лет назад
You are one of the most helpful teachers in youtube! Thanks!
@ExplainingComputers
@ExplainingComputers 6 лет назад
:)
@garymargot4379
@garymargot4379 7 лет назад
Excellent tutorial
@KrishnaDasLessons
@KrishnaDasLessons 8 лет назад
Thank you very much, I learned a lot from this video.
@RSGaming-lt4zh
@RSGaming-lt4zh 7 лет назад
I just received my Rasberry Pi 3 Model B the other day there so look forward to watching your tutorials on YT. Thanks!
@ExplainingComputers
@ExplainingComputers 7 лет назад
Enjoy your new computer. :)
@haiaokuwa
@haiaokuwa 8 лет назад
Thanks for this. I've been a an electronics hobbyist for months. This is the first clear explanation of why and how a pull up/down resistor is used. Tons of videos where they say they're using them. So few explanations as to why or how they worked (what they do and why to use them), I was starting to wonder if they were different kinds of resistors. Very clear video. Thanks again.
@ExplainingComputers
@ExplainingComputers 8 лет назад
Many thanks. The more I dug into this, the more I realized that a lot of confusion exists regarding the resistors (are they needed? why? etc), so I thought I'd do an explicit section on them and really try to lock things down.
@kusatech8005
@kusatech8005 6 лет назад
Good Video, nice combination of circuit theory, actual wiring and enough software to get it going.
@petermsamson
@petermsamson 7 лет назад
Love the way you explain everything.. I hope you plan on doing more Tutorial, examples..
@baxtercohen
@baxtercohen 7 лет назад
Thank you very much! Very clear explanation on great ideas to have a computer respond to real world events.
@Taran72
@Taran72 5 лет назад
Great video! that's what I call a great class where efficiency and ease of learning meet. In a few minutes you really explained everthing I needed to know without wasting time. Thanks!!!
@ExplainingComputers
@ExplainingComputers 5 лет назад
Thanks.
@MicrobyteAlan
@MicrobyteAlan 4 года назад
Breadboarding, hardware and logic, good stuff. Thanks
@rorycormack7577
@rorycormack7577 8 лет назад
Thank you for the video. I have learnt a lot and will be trying this out. I am still enjoying your videos and hope to carry on enjoying them.
@jameszah
@jameszah 6 лет назад
This is the best raspberry site I have ever seen! Please keep it up! very well explained and in the appropriate English language! Thank you
@ExplainingComputers
@ExplainingComputers 6 лет назад
Thanks for your kind feedback. :)
@redazaiti2157
@redazaiti2157 7 лет назад
amazing. really love how you share your experience :). I'm happy to learn from you.
@svizztech
@svizztech 8 лет назад
This breadboard must be at least 1000 years old :D Thanks for the video.
@ExplainingComputers
@ExplainingComputers 8 лет назад
I think is it a mere 35 years old! ;) But it still works fine.
@EverydayTechable
@EverydayTechable 5 лет назад
Thank you! I've already done a kit from Adeept but did not know about Idle, I've been using Vim or sudo and haven't been thrilled as I prefer some for of gui for highlighting certain things.
@argentosebastian
@argentosebastian 7 лет назад
I really enjoy watching your videos. Very detailed and easy to understand. I really would like if you can make a video of how to connect a Pi to an Arduino through the serial port and talk to each other. I have been watching a bunch of them but none of them are very clear to understand. Thanks
@dimjim2365
@dimjim2365 7 лет назад
Awesome. Loved this little tutorial
@ShitBrick785
@ShitBrick785 5 лет назад
That explanation about circuits was amazing.
@ExplainingComputers
@ExplainingComputers 5 лет назад
Thanks.
@makebuildmarket5735
@makebuildmarket5735 7 лет назад
Excellent Explanation! Well done.
@rayjohnson7417
@rayjohnson7417 7 лет назад
great video, thank you for taking the time to make it
@neilvermeulen5283
@neilvermeulen5283 7 лет назад
Thank you Christopher. You explain well.
@fisheye8566
@fisheye8566 8 лет назад
Excellent demonstration!
@Kolohekat
@Kolohekat 6 лет назад
Christopher Barnatt is a Good RU-vidr... Explains in detail...
@ExplainingComputers
@ExplainingComputers 6 лет назад
Thanks.
@BuildswithBrian
@BuildswithBrian 4 года назад
Thank you very much, this video helped me greatly, I’ve subscribed and I am excited to watch more of your videos
@ExplainingComputers
@ExplainingComputers 4 года назад
Great to hear! This remains one of my favourite videos. You may like some of my Raspberry Pi robotics videos, and also Python intro.
@johnrobertd748
@johnrobertd748 6 лет назад
Thank you! Very simple, but also very helpful.
@azoresmarine
@azoresmarine 8 лет назад
Outstanding tutorial Thank You
@vikasnar
@vikasnar 8 лет назад
Liked the way you explained .... made things easy to understand . Thanks for the vedio
@tonybanjo
@tonybanjo 5 лет назад
Your videos are excellent, subscribed
@ExplainingComputers
@ExplainingComputers 5 лет назад
Thanks for the sub -- welcome aboard!
@brightsun3608
@brightsun3608 5 лет назад
This is the best tutorial for IoT I met.
@ExplainingComputers
@ExplainingComputers 5 лет назад
You are very kind. :)
@emremutlu44
@emremutlu44 7 лет назад
Nice pack of information! thanks.
@williamhall5893
@williamhall5893 6 лет назад
Love these videos. Thanks!
@toms4123
@toms4123 2 года назад
Great presentation style, well explained and easy to,follow
@eng.aljobury5087
@eng.aljobury5087 7 лет назад
Thank you so much for this beautiful explain
@attiqueur-rehman2134
@attiqueur-rehman2134 3 года назад
Hats off to you man for precisely describing everything. Works for one of my problem quite easily. (y)
@ExplainingComputers
@ExplainingComputers 3 года назад
Thanks. :)
@tomasfranco4870
@tomasfranco4870 3 года назад
Love these videos... Excelent explanation.
@billg2345
@billg2345 4 года назад
You are great thanks for all the great work you do, I had to recommend this site you developed to family.
@ExplainingComputers
@ExplainingComputers 4 года назад
Much appreciated!
@theneroliveira
@theneroliveira 8 лет назад
Great video, looking forward for more! :)
@segarlinktech
@segarlinktech 8 лет назад
this video is very help full for engineer or student ,thanks
@leonlao744
@leonlao744 7 лет назад
講解的非常好 也很用心 !!
@khalidrao4716
@khalidrao4716 3 года назад
Its really a useful and very good video enjoyed keep it up
@xxportalxx.
@xxportalxx. 3 года назад
Wow, how is nobody commenting on the sheer size of this man's read switch!?
@dbyrd7827
@dbyrd7827 4 года назад
Positively brilliant tutorial and instruction. Your educational skills are masterful. Thank you for sharing your knowledge, and skills. Technical mastery and compassion incarnate. Thank you, Mister Barnett!
@ExplainingComputers
@ExplainingComputers 4 года назад
Many thanks!
@fuanka1724
@fuanka1724 5 лет назад
Interesting, thanks for this nice video!
@sherakhela4044
@sherakhela4044 7 лет назад
Thanks for great explanation.
@trondknudsen6689
@trondknudsen6689 2 года назад
Very useful info! I'm going to use it to make a sleep tracker.
@JYKei
@JYKei 6 лет назад
Great tutorial!!! Thank you sooooo much!
@shingabiss
@shingabiss Год назад
Best tutorial I've seen! You explain things in a very methodical and clear way at a good pace. I am not new to electronics, just to the Raspberry Pi. I have started with Raspien and am using Thonny IDE. I see you prefer a different coding window, is it simply a command line? Do you prefer it to the Thonny? Thanks for making such outstanding tutorials.
@alexander_adnan
@alexander_adnan 6 лет назад
you're becoming a hero now....
@ExplainingComputers
@ExplainingComputers 6 лет назад
:)
@efrizal100
@efrizal100 6 лет назад
This is a good video is easy to understand GPIO works for newbie like me ..
@brettchenier1010
@brettchenier1010 5 лет назад
I enjoy your videos. What is the "blue stuff" you use to hold the switch and breadboard in place?
@pmr1wrt53
@pmr1wrt53 8 лет назад
Very nice and good video instruction.
@Vampier
@Vampier 8 лет назад
You know that you don't need sudo anymore to control the GPIO ports right? Excellent tutorial, I wish you did this when I started 2+ years ago :)
@ExplainingComputers
@ExplainingComputers 8 лет назад
Thanks for this. Yes, I learnt yesterday that the latest version of Raspbian removes the need for the sudo on Idle. Not that everybody will be running it yet! :)
@simplelifediy1772
@simplelifediy1772 8 лет назад
this is great!!! thanks
@joserobertoberithepedrosa2091
@joserobertoberithepedrosa2091 6 лет назад
Thanks for posting this amazing video !!! I need to use GPIO 10, BCM15 (RXD). Do you know if there is any post about it ?
@MaTXiNGuN
@MaTXiNGuN 4 года назад
Thanks a lot for your great explanations and for your work
@ExplainingComputers
@ExplainingComputers 4 года назад
Thanks.
@nilskassens2961
@nilskassens2961 7 лет назад
exacty what I'm looking for. Thank's
@MarkBamford
@MarkBamford 2 года назад
Fantastic channel. Thanks and kind regards, Mark
@ExplainingComputers
@ExplainingComputers 2 года назад
Thanks for your support, most appreciated. :)
@gayslutfucksuck
@gayslutfucksuck 5 лет назад
Are you by any chance doing a give away on any of these SBCs? I would love to submerge one in Mineral Oil and do load tests. I would also like to see if the GPIO works submerged as well
@MadMike93
@MadMike93 7 лет назад
awesome video about GPIO input! Oh my God! So interesting!
@ExplainingComputers
@ExplainingComputers 7 лет назад
Many thanks. This video took ages to make. :)
@markanderson2904
@markanderson2904 3 года назад
Chris, I love your videos and am working my way through all of them. May I suggest that the schematic drawing of the breadboard connections is confusing. I think you should explain how the "squares" are connected for those who are not familiar with breadboards. I.e., each vertical columns of squares on the extreme left and right are electrically connected together, while each horizontal rows of squares (excluding the extreme left and right squares) are connected together.
@juandemin2930
@juandemin2930 7 лет назад
Excellent!!!!! thank you!!!!
@davivify
@davivify 4 года назад
Wondering if you can have 'on conditions' or event handlers like you can in environments like, say, Javascript/Web. That might be more convenient than having to write polling loops all the time.
@jazzochannel
@jazzochannel 4 года назад
The 1k resistor to the board-pin makes sense almost no matter what. What would happen with the print statements (I mean the final output) if you had omitted the 10k resistor to the ground? Would it still work in some cases but not in others? What would I need to check / know to ascertain whether I need to put a resistor ?
@muhsinac6461
@muhsinac6461 6 лет назад
Hi, how to check the status of relay module using interrupts with raspberry pi3
@tinkmarshino
@tinkmarshino 5 лет назад
the pure torture of it all Chris is that I have to wait until the first to get my check... dang and I thought I learned patients as a lad... well I guess it is learn and learn again eh? this is all too exciting..
@tinkmarshino
@tinkmarshino 5 лет назад
@Darth Digital Yeah you are right.. it come from 3 things.. being self taught, being old and relying to much on spell check.. It doesn't make me sad but it does kind of drive me nuts at times.. what is worse now it that I am starting to transpose letters like a dyslexic person although I never suffered from it before.. Ah the joys of getting old.. you don't seem to be doing to bad for ASD.. sorry for troubles.. but it will make you stronger! have a good new year!
@freevideos051
@freevideos051 7 лет назад
Nice, thanks for video :)
@Super8Rescue
@Super8Rescue 2 года назад
Thanks for this.
@wnrsm
@wnrsm 4 года назад
Thank you for making this! I have a recommendation. Please consider spreading out your components on the breadboard so that the fixed camera view and less intuitive viewers (me) can clearly see the inline resistor a couple of cm away before it splits into grounding-resistor and switched-3.3V
@cavynap
@cavynap 3 года назад
Hi mister Barnett. Thank you for your great explanation. I'd like to ask you a video to learn how to work with with analogic inputs and web page. My idea is to use Pi to monitoring electrical energy and correct the power factor. Then showing how the energy is going on an web page. Is this possible?
Далее
Raspberry Pi Pico: Inputs & Servo Control
17:20
Просмотров 130 тыс.
Basic usage of the Raspberry Pi GPIO pins
13:44
Просмотров 95 тыс.
меня не было еще год
08:33
Просмотров 2,4 млн
D3 Ваз 2107 Не умри от зависти!
18:57
Building a 4-node Raspberry Pi Cluster
18:41
Просмотров 1,1 млн
Raspberry Pi Automation #1: Mains Relay HAT
15:03
Просмотров 271 тыс.
001 Controlling high voltages with the Raspberry Pi
4:54
How To Safely Connect a Breadboard to Raspberry Pi
11:21
Using Relays and Relay Boards with the Raspberry Pi
10:35
Raspberry Pi Robotics #2: Zumo Robot
15:55
Просмотров 473 тыс.
I2C with Arduino and Raspberry Pi - Two Methods
30:13
Просмотров 201 тыс.
Игровой Комп с Авито за 4500р
1:00
When you have 32GB RAM in your PC
0:12
Просмотров 769 тыс.