
So far, this series of articles has mainly focused on the software aspects of the Raspberry Pi, and today we will learn about the hardware. One of the main features that intrigued me when the Raspberry Pi was first released was its General Purpose Input/Output (GPIO) pins. GPIO allows your Raspberry Pi programs to interact with sensors, relays, and other types of electronic components connected to it, bridging the physical world.
Each GPIO pin on the Raspberry Pi has either a predefined function or is designed to be general-purpose. Additionally, different Raspberry Pi models have either 26 or 40 GPIO pins, which you can use depending on the situation. There is a detailed description of each pin and its functions available on Wikipedia.
You can do much more with the GPIO pins on the Raspberry Pi. I have written a few articles about using GPIO, including three articles on controlling holiday lights with the Raspberry Pi (first, second, and third), where I made the lights dance to the music using open-source software.
The Raspberry Pi community has done a great job creating various libraries in different programming languages, so you can interact with the GPIO using C, Python, Scratch, and other languages.
Furthermore, if you want a better experience in interacting with the physical world using the Raspberry Pi, you can opt for the Raspberry Pi Sense Hat, which is a very affordable circuit board that plugs into the Raspberry Pi GPIO pins, allowing you to interact with LEDs, joysticks, barometers, thermometers, gyroscopes, accelerometers, and magnetometers through programming.
via: https://opensource.com/article/19/3/gpio-pins-raspberry-pi
Author: Anderson Silva Topic: lujun9972 Translator: qhwdw Proofreader: wxy
This article is originally compiled by LCTT and proudly presented by Linux China