Introduction to GPIO Ports Raspberry Pi


In the article on the robot kit Store and report on the possibility of integrating the Raspberry Pi kit to expand the possibilities. In this article, we will create an introductory tutorial on the organization of the Raspberry Pi GPIO to control LED and learn improved, how they work before moving any further.

First, we would like to talk to the GPIO

If you do not know even the GPIO ports you should know that are some pins that integrates plate Raspy with which you can work electronically for general purpose as you would with Adriano. From here comes his name GPIO (General Purpose Input Output), in Castilian Input / Output General Purpose. The GPIO ports are defined in the image on the cover of this article. Are implemented in two rows of 13, ie, 26 pins. Although physically all look alike, they are not. In the next picture, you can see a detailed chart.

gpio ports raspberry Pi

Correspondence table of the GPIO pins of the Rasbperry Pi Rev 2.0

Bear in mind that the pins are of type and are not protected. So be careful with magnitudes (voltages, currents,) to avoid damaging your plate. These are the pins of the Raspberry Pi Rev 2.0, with which we will work in our article and is available in our store. The Rev 1.0 is slightly different. In our case, we see 1 pin 5v, 3.3v other, earth (ground), type 6 DNC (Do Not Connect), eight GPIO normal and special. For example, between special we found the TXD and RXD UART for serial communications interface SDA, SCL, MOSI, MISO, SCLK, EC0, EC1.

Equipment needed

The first thing we do with the Raspberry Pi is stop connecting cables to GPIO number 17, capable of bringing to light our LED 3v3. The other cable will be connected to pin 6, namely, the ground. After connecting remember the cathode (short pin LED) to the ground wire and the anode (long pin LED) to GPIO 17 to provide voltage.

Well, we by now have all of the configured electronics we now turn to the agenda. Linux in this case, it is a UNIX operating system. Without going into detail, the philosophy of these systems is that everything is a file, including the hardware.  If you access the terminal in the Raspberry Pi, we can create an entry to the pin 17 so that the system creates a file structure corresponding GPIO.