How GPIOs Work - Raspberry Pi 5 Tutorial (#6)

How GPIOs Work - Raspberry Pi 5 Tutorial (#6)

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (1 сегментов)

Segment 1 (00:00 - 04:00)

and welcome back this is episode number six of this tutorial series on Raspberry Pi for complete beginners you can find the series playlist Link in the description and let's get started in this episode you will learn more about the gpio panel on the Raspberry Pi and how the gpus work this quick overview will be super useful for what's coming next here is the complete Pine out for the Raspberry Pi 5 but it's also the same as for the Raspberry Pi 4 3 and two the gpio have haven't changed with the latest evolution of the bolt so as you can see we have some pins in Black which represent the ground okay we've already used one all those pins are connected together then we have what we call power pins so we have two pins for 3. 3 volt in yellow and two pins for 5 volt in red then we have the gpios in Orange so again gpio means general purpose input output and each GP has a number that's the number you will use in your python code to interact with that gpio and a quick reminder here is that gpios support 3. 3 volt not 5 volt we only have two pins here that support 5 volt so now how are gpos controlled well it's pretty simple a gpio will be set as either an input pin or an output pin input will be used when you want to read some data for example with a push button you want to read the state of the button and output will be used when you want to write some data for example you want to set an LED so you want to turn on or off an LED so once the mode for the gpio is set you can use it if it set as an input you can read a value the value has only two states high and low so this is a binary State and high and low here correspond to the voltage which was read from the pin if the voltage is high enough and close to 3. 3 volt then the value will be high otherwise it will be low and if you have set the GPI as output you can then write a value to it and it's also going to be high or low for an LED if you want to turn on the led the gpiu state will be high so close to 3. 3 volt and if you want to turn off the led the gpiu state will be set as low so close to Z volt and that's basically how a GPI work okay it's not that complicated and in the code we will use a python library that takes care of all that for you so basically we won't have to deal directly with this and you can just then focus on your application but with what you've seen here in those few minutes at least you understand the basics of how it works under the hoood now if we come back to the Raspberry Pi pin out image you can see that the gpio are not set in any specific order okay and some numbers are missing and that's totally okay and it's nothing to worry about you just have to be extra careful when finding the GPI number corresponding to the pin number okay so you can see the pin number we have numbers from one until 40 so those are the gray pins and they are ordered but we are not going to use those numbers we are going to use the GP numbers directly and then what else do we have you can see that we also have two reserved pin in Gray so you should not use those then we have two pins in green that are used for uart communication you also have alternate functions with i2c and SPI Communications so all those are more Advanced Communications and in this course we are just going to focus on the gpio but if you want to learn more about those Communications that can be a nice thing to research after this course all right that's the end of this episode if you found it useful you will definitely like my full complete course on Raspberry Pi named Raspberry Pi for beginners this course contains 10 hours of Hands-On video lessons you can find the link in the description thank you for watching see you in the course or in the next tutorial of the series

Другие видео автора — Robotics Back-End

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник