Тёмный

Raspberry Pi GPIO - Getting Started with gpiozero 

DroneBot Workshop
Подписаться 598 тыс.
Просмотров 434 тыс.
50% 1

Learn to use the Raspberry Pi GPIO connector and the gpiozero library to interface with an LED and some switches. We’ll even make a very simple camera and have our Pi take a selfie!
Article with code samples: dronebotworkshop.com/raspberr...
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
The GPIO (General Purpose Input/Output) is a 40-pin connector on every modern Raspberry Pi board that allows you to expand your Pi and connect it to external sensors, drivers and displays. And today we’ll start from scratch and see how easy it is to interface simple devices to the GPIO and control them with Python, using the gpiozero library.
When we need to interface with sensors, displays or motor drivers we generally use an Arduino, but there are several advantages to using a powerful microcomputer like a Raspberry Pi. With its increased processing power, large storage and memory and ability to interface with the Internet and Bluetooth it can add a new level of power to our projects.
The 10-dollar Raspberry Pi Zero W is a viable replacement for an Arduino board, and it's the Raspberry Pi that I’ll be using in today's demonstrations. In fact, everything I demo today could have easily been run on a 5-dollar Raspberry Pi Zero, as we don’t need the networking or Bluetooth capabilities.
We’ll keep it simple today and only interface with an LED and a couple of pushbutton switches. Just so you can get a good feel for how easy it is to code for the GPIO, thanks to the power of the gpiozero library.
To make it interesting the final demos will also use the Raspberry Pi Camera, and we’ll build a functional digital camera with only a few lines of code. Try that with an Arduino!
Here is the table of contents for this rather long video:
00:00 - Introduction
01:45 - Pi vs Arduino
06:35 - Selecting a Raspberry Pi
10:28 - GPIO Prototyping Accessories
15:41 - Raspberry Pi GPIO
19:51 - gpiozero Library
21:23 - Hooking up to the GPIO
22:51 - Setting up the Raspberry Pi
25:00 - Blink Compare (Arduino vs Pi)
33:14 - LED and Button Experiments
40:17 - Hooking up the Camera Experiment
41:20 - Controlling the Camera
While today's demos are extremely simple they will pave the way to doing more complex things with the GPIO, and I’ll be doing that in future videos. Make sure you’re subscribed to the channel so that you don’t miss those!
And keep in mind that the Raspberry Pi GPIO has been unofficially adopted by many SBC (Single Board Computer) manufacturers, so learning to interface to the Pi will also open the doors to working with several other platforms.
BTW, for those who make it through this long video, there is a short “blooper” at the end!
Enjoy the video!

Хобби

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

 

3 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 241   
@sophianekhalfouni5004
@sophianekhalfouni5004 Год назад
I just wanted to express my gratitude for the quality of your courses. You are doing an excellent job, sir! Please keep doing well. Thanks again. 😊
@larrygj4764
@larrygj4764 3 года назад
Thank you for such thoroughness and clarity. Much useful stuff packed in here!
@scottburfoot3930
@scottburfoot3930 3 года назад
Dronebot, you inspire me to learn this stuff in the best way possible. So detailed, yet so precise with only the most important information displayed. Cant wait to see you introduce openCV to the 5dof robot arm
@soky157
@soky157 4 года назад
You make everything so clear and easy to understand. Thank you.
@brebre3582
@brebre3582 4 года назад
Loved your video instantly sir. One of the best explanations of Pi anywhere on the Internet. You have the pace and patience of a seasoned teacher. Kudos to you and thank you. Subscribe done!
@rondlh20
@rondlh20 4 года назад
Amazing job again, very interesting and educational
@raymondmichael4987
@raymondmichael4987 4 года назад
I really like how do your presentation, very impressive. I'm going full on Raspberry Pi now; keep them coming. Greetings from Tanzania 🇹🇿
@shingabiss
@shingabiss Год назад
in my opinion, your have THE BEST videos! Delivery pace perfect, clarity perfect, friendliness perfect!
@bawadanieldangema1146
@bawadanieldangema1146 9 месяцев назад
You make learning embedded systems so easy and fun. Thank you Sir 😊
@chuckmuckamuck8001
@chuckmuckamuck8001 3 года назад
I've recently taken up this hobby and this my new favorite channel. Thanks!
@BigDogMoya1
@BigDogMoya1 3 года назад
Thank you so much! You're an amazing teacher.
@norbertbans
@norbertbans 3 года назад
Cool, I like the small scene at the end with the mixed up PI‘s!!! Keep doing more of those well explained clips!
@petermolnar6017
@petermolnar6017 2 года назад
As always, clear and to the point! Thank you for sharing this!
@ggattsr
@ggattsr 4 года назад
Best video comparison on the features and functionally of the Pi and Arduino that I have found on RU-vid. Thanks for the info.
@ShuMO99
@ShuMO99 3 года назад
that was awesome. I really needed this level of information fed at this pace. Looking forward to watching many more. thank you!
@JakeThomasCreative
@JakeThomasCreative 3 года назад
Detailed yet engaging! Thank you once again.
@Meine_Rede
@Meine_Rede Год назад
This is perfectly explained. Short and clear! Thanks a bunch.😄
@dave-in-nj9393
@dave-in-nj9393 4 года назад
This is a good video and you cover things in detail. Since it is a RPi video, it is focused on that and you do a good job.
@DavidVine-DOCVIDPRO
@DavidVine-DOCVIDPRO 3 года назад
Wow! What a great workshop. Super organization too!
@paullee107
@paullee107 3 года назад
I commented earlier; sir, you have THE BEST Arduino & RPi videos for beginner & intermediate users -- The best channel, that I will support and market. TY!
@sampreechar5368
@sampreechar5368 4 года назад
Wow, Awsome!!! very professional, VDO, Sound. Well put together. Thanks a million.
@victorkarthik8135
@victorkarthik8135 2 года назад
Great job providing all I need to get start with Raspberry Pi. It was nice comparison with Arduino. It gives a good understanding between microcontroller and Single Board Computer. Keep up the good work. Thanks!
@AnthonyFournier
@AnthonyFournier 2 года назад
I'd love more content like this. You have such a wonderful way of explaining things, I'd watch tutorial's of any kind.
@robertpendergast2620
@robertpendergast2620 4 года назад
Clear and detailed. Thanks.
@ar.mamunhossain9592
@ar.mamunhossain9592 4 года назад
Great!. Thank you sir!. We are expecting more video on this topic.
@paulaxford6754
@paulaxford6754 4 года назад
Great video! Even with Arduino and Python experience I learned a lot from that, specifically that GPIO can be shared among Python programs.
@abusultanfahad2789
@abusultanfahad2789 2 года назад
Excellent simple clear explanation thanks.
@davidlira8853
@davidlira8853 2 года назад
your back wall is so organized! awesome
@itsmmdoha
@itsmmdoha 2 года назад
I thank you from the bottom of my heart ❤️ for making this video.
@Hitmonkey420
@Hitmonkey420 3 года назад
What a workshop! Lookin pretty sharp, I'm jealous
@havafazai9023
@havafazai9023 4 года назад
Please make more tutorials. Best mechatronic teacher ever
@grand.pitcher
@grand.pitcher 4 года назад
Fantastic, you did very useful and great job. Thank you so much!
@robertdouville74
@robertdouville74 4 года назад
Loved it, thanks, very well done and informative!
@mandelbro777
@mandelbro777 4 года назад
Wonderfully explanatory as usual. Great vid.
@goldenpacificmedia
@goldenpacificmedia 2 года назад
Thank you for your terrific lesson and teaching.
@peterashley6042
@peterashley6042 4 года назад
Excellent video. Thank you.
@karthikeyank3219
@karthikeyank3219 2 года назад
Excellent!!! Really helpful for beginners
@sugundanmm1160
@sugundanmm1160 2 года назад
Detailed explanation.I really enjoyed learning here
@cybersean3000
@cybersean3000 3 года назад
Excellent tutorial. Thank you.
@kandarpsoni7529
@kandarpsoni7529 4 года назад
Awesome video. Simply brilliant. Thanks a Ton. 👍🏻
@Sam-tg4ii
@Sam-tg4ii Год назад
very clear. Thank you
@mursitkc5328
@mursitkc5328 3 года назад
thanks a lot . i love your documenteries
@danieldefo7801
@danieldefo7801 2 года назад
Great video! Thanks you!
@abegafouda9136
@abegafouda9136 2 года назад
Hé hé ! Incredible! God-sent man! You are answering all the questions I have in mind! I have been offered a Raspberry Pi 4 by my only real friend in the world. Bought yesterday, not yet sent. Am in Cameroon, he is in Europe... And the 1st video as I open RU-vid is this one, created by whom? You, one of the best, with clear, concise, comprehensive explanations ever. Thank you.
@hubercats
@hubercats 3 года назад
Great video! Thank you.
@tomjoad1060
@tomjoad1060 Год назад
Thank you for a well-made video!
@chrismoore9223
@chrismoore9223 4 года назад
You’re the best. Thank you.
@NewAgeDIY
@NewAgeDIY 4 года назад
Great video today! Can’t wait until the next one. You will of course need to update your shopping channel and add a “ I love my Raspberry Pi” T-shirt😘
@bonganijele9770
@bonganijele9770 Год назад
Nice content i like the way he talk's he's loud and clear. Fully explained in details.
@anurasenarathna1703
@anurasenarathna1703 Год назад
Great Video as Always.
@levelmastersystems117
@levelmastersystems117 4 года назад
Thank you very much, for this video.
@Michael-1205
@Michael-1205 4 года назад
Awesome, very concise and easy to watch presentation. I thought Python was something to be afraid of but your presentation has just changed my mind. Thank you!
@idris7464
@idris7464 2 года назад
Micheal python is easy it is not C++😁
@kingofhavila9850
@kingofhavila9850 2 года назад
@@idris7464 I'm struggling to learn it 😪 😩
@hmdmddh
@hmdmddh 3 года назад
Thank you very much for your well explained Videos
@khun_le
@khun_le 4 года назад
Awesome video. Thanks and keep up the great work.
@bigsteve6729
@bigsteve6729 2 года назад
Just got some new pi gear thought I'd pop back to the workshop to freshen up my knowledge after a nodemcu binge 😁
@antonnym214
@antonnym214 4 года назад
Outstanding video! Very interesting and informative. I really like your relaxed tone. Super easy-going, which is great. I have a Pi 2B and not doing much with it. just wrote a few programs to the display. more or less a screensaver, but have my eye on a new Pi4 (maybe for my birthday) so I can enjoy it with wifi. That model really impresses me, because it's virtually a desktop computer replacement. All good wishes, sir!
@billstrain1
@billstrain1 4 года назад
Very good video. You are a good instructor.
@psudrat
@psudrat 3 года назад
Thank you so much! Merci beaucoup!
@dav8485
@dav8485 3 года назад
a great video, congratulations!
@153SCORN
@153SCORN 4 года назад
Used the PI & Arduino together. Best of both worlds.
@warrenscorner
@warrenscorner 4 года назад
Of course they didn’t need to social distance themselves when you did this video. Thank you for the videos. Stay well!
@jeremiahayres103
@jeremiahayres103 2 года назад
You are awesome! This helped me a lot! Also I love the lab!
@EvileDik
@EvileDik 4 года назад
Another great video, I've been wanting to graduate from attempting to blow up Arduinos to something more expensive for a while!
@MarkLawry
@MarkLawry 2 года назад
It was a good reminder seeing you attached to an antistatic ground.
@whatwhat9485
@whatwhat9485 3 года назад
Very nice. Thank you
@torque6389
@torque6389 2 года назад
Great video!
@testbranding
@testbranding 4 года назад
Amazing job it's educational too if possible 1000 thumbs up
@johannespralle6831
@johannespralle6831 3 года назад
You are a great instructor. Thanks. Suggestion: Talking about Pi to Pi communication via SPI Bus and CAN Bus.
@user-fq3pz4io2y
@user-fq3pz4io2y 6 дней назад
Thank You!
@Perspectologist
@Perspectologist 4 года назад
There are many different Arduino IDE compatible microcontrollers now. I was late to the Arduino world. I got started with the BASIC Stamp and their Javelin board. I bought one genuine Arduino Uno to help support their effort. It was much slower, less capable and more expensive than other options. I’ve rarely used it. I’ve mostly been using the ESP 8266, ESP32 and ATSAMD boards. The newer Arduino boards may help them to be more competitive. Certainly the Arduino Uno is a great tool for some things, I just mostly skipped over it due to when I got into this hobby. These days I’m also getting away from the Arduino IDE, and using Platform IO. I’m open to trying the new Arduino Pro IDE when it is further along. I need project settings.
@logovka9671
@logovka9671 3 года назад
Super helpful!
@eduardovillar2211
@eduardovillar2211 3 года назад
Thanks for video, that shows the unlimited capabilities of combine gpio with a computer, I guess it is the next steps learning after MCU is under control. Combined by displays, mqtt, cameras, HMI and so on possibilities are unlimited!! This is my first contact with Python and seems more compact language than Arduino C, interesting to keeping curious mind. Thanks again, hope to see more videos like that.
@alexandrpetrov1110
@alexandrpetrov1110 3 года назад
Thank you!
@johnathanball3344
@johnathanball3344 3 года назад
Great American Welcome. You’re an inspiration..... 😎
@kirankumar5868
@kirankumar5868 3 года назад
Love from India
@ESwitchInc
@ESwitchInc 4 года назад
Great stuff, once again! Would love to send you some switches to work with for your next video, let's talk!
@cybergames33pl52
@cybergames33pl52 2 года назад
so clear explained after bought i chosen good rasberypi but if i founded you before i could get easy explained my choice between rasbery and arduino i am begin of begin with exp programming so all understanded more easy with you yt channel
@rgdphome8974
@rgdphome8974 4 года назад
👌 Gr8 as usual.
@lesbac
@lesbac 3 года назад
thank you.
@sannyabacha4025
@sannyabacha4025 Год назад
Brilliant!!!
@sebbel3260
@sebbel3260 Год назад
The raspberry pi party lol! That made me sub
@balkrishnawagle7205
@balkrishnawagle7205 2 года назад
Sir You r a Great Thanks you Sir
@electrotsmishar
@electrotsmishar 3 года назад
wonderful video
@martincregg
@martincregg 3 года назад
Thank you
@lollllloro
@lollllloro 4 года назад
Hi! I believe there is a mistake on the slide at 3:48 A byte (B) usually means an octet [eight bits (b)] and computer memory and storage size is usually expressed in bytes instead of bits. As far as I know after searching online, the RAM and SRAM size units in the slide should have been [kB, MB, GB] instead of [kb, Mb, Gb] For example, the ATmega328 has 2 kB (16 kb) SRAM and 32 kB (256 kb) flash memory. The number etched on the top of SRAM and flash chips is usually in bits, though, and so are transfer speeds. I really like your videos, keep up the good work! :)
@davekendall4698
@davekendall4698 4 года назад
Great video. I have been wondering what to choose for a stand alone logger for my costly heating system. i have (4 zones + boiler) for on / off times to display on grafts so which is on longer ( not hotter) & then maybe then show temperatures for (send & return of boiler water). I think it would be a very useful project for many people to used. Thank you again
@ertan1147
@ertan1147 4 года назад
it was very clear thank you. You could add also Windows 10 IoT and use c# to code :)
@nrupensix
@nrupensix 3 года назад
Well done
@naeemhaq3504
@naeemhaq3504 4 года назад
i like your videos quality
@PacocaAir
@PacocaAir 4 года назад
Thanks !! Please make more videos about the subjects raspberry and jetson nano!
@glen5680
@glen5680 2 года назад
really nice person, hope the best to you
@ttheo3
@ttheo3 2 года назад
Hey ! I love your channel and your videos ! I just wanted to correct a few things, arround 4:50, you says Raspberry needs a bunch load of USB devicesto get starting. I actually find it much easier to start than arduino. I just use for my PI : USB power supply, SD card. Having the computer connected to the wifi is really easy, and using SSH to get distant access is easy to. You just need a computeur to SSH into the pi, but you don't need USB devices to access and programm it. Wich for certain case it's easier than accessing the USB port of an arduino builted in the project. Anyway, thanks a lot fort the sharing of this very good video :D
@RottnRobbie
@RottnRobbie 4 года назад
In a couple of the Python sketches, the code was in a While block. Great, and easy to relate to Arduino. But other Python examples have NO LOOP, and end with a call to pause (), with no mention of it or explanation of what it's for (except to say your pausing the program). Maybe it goes beyond your intended scope, but I really think you should've explained how the functions (objects) keep working, and don't just end! Anyone coming from an exclusively Arduino background won't have any idea of what's happening here.
@scotthiggins7804
@scotthiggins7804 4 года назад
Great instructional video! Can you add some links for the bits and bobs that you used in this project?
@desertbotio
@desertbotio 4 года назад
Great videos. The Arduino MKR 1000 and 1010 WiFi - have WiFi in their name. Though a bit pricey. There is also a huge community that prefers the ESP32 related Arduino compatibles with their built in WiFi.
@wallaceshackleton1889
@wallaceshackleton1889 4 года назад
Great idea, although I've got to say that Unicorn poo is easier to buy than a Pi W.
@joaomarcelo9027
@joaomarcelo9027 3 года назад
ce é o cara!
@Boradumir
@Boradumir 4 года назад
Very good information and even perfectly understandable for a not native speaker... One question about switches and raspberry pis... does the library you used automatically ignore keybouncing?
@usmanmehmood5224
@usmanmehmood5224 4 года назад
Great video, can you please make a video of RFID sensor interface with rpi3
@OctoomyYTOfficial
@OctoomyYTOfficial 3 года назад
I actually use my pi for cable TV some times, since sometimes my nephews for some weird reason want to watch tv in my room.
Далее
Raspberry Pi Pico
16:16
Просмотров 304 тыс.
I2C with Arduino and Raspberry Pi - Two Methods
30:13
Просмотров 201 тыс.
The TOP 3 uses for a Raspberry Pi!!
12:07
Просмотров 1,4 млн
Introduction to ESP32 - Getting Started
47:57
Просмотров 1,6 млн
Raspberry Pi: Using GPIO Inputs
18:41
Просмотров 581 тыс.
Raspberry Pi 5: EVERYTHING you need to know
20:32
Просмотров 1,1 млн
Raspberry Pi - Control GPIO Pins with GPIOzero Library
19:15
Pico Prototyping - Building a "Pico Uno"
36:08
Просмотров 89 тыс.
деревня.лето.юность.эх
1:01
Просмотров 18 млн
Get Yours From Our Profile Description 🙏
0:19
Просмотров 12 млн