介绍 (Introduction)
A Rasberry Pi (RPi) is a low cost mini computer and has the size of a credit card. It is a great solution for hobby and home projects (and some commercial, too) because it has various input/output pins, video, camera, sound interfaces and many good OSes to install.
Rasberry Pi(RPi)是一种低成本的微型计算机,具有信用卡大小。 对于业余和家庭项目(以及一些商业项目),它是一个很好的解决方案,因为它具有各种输入/输出引脚,视频,摄像头,声音接口以及许多不错的OS。
One the main characteristics of a RPi is its GPIO pins. GPIO stands for General-Purpose Input/Output. These pins are the interface with the external world.
RPi的主要特征之一是其GPIO引脚。 GPIO代表通用输入/输出。 这些引脚是与外部世界的接口。
In a simple way, you can think them as switches that you can read the status (inputs) and lamps that you can turn on or off (outputs).
通过简单的方式,您可以将它们视为可以读取状态(输入)的开关和可以打开或关闭(输出)的指示灯。
布局 (Layout)
The Raspberry Pi contains 40 GPIO pins, distributed as the image below.
Raspberry Pi包含40个GPIO引脚,如下图所示。
![Image for post](https://img-blog.csdnimg.cn/img_convert/80d41a0f7ccfb3f9a58800d827c2e634.png)
As you can see, some inputs can also have other functions than just input or output.
如您所见,某些输入还可以具有除输入或输出以外的其他功能。
GPIO: general input or output pin. The output level is 3.3V with 50mA max, so avoid using with a large load which can damage the pin and even the board. A LED, ok. A motor, don’t even think about it.
GPIO :通用输入或输出引脚。 输出电平为3.3V,最大电流为50mA,因此请避免在大负载下使用,否则会损坏引脚,甚至损坏电路板。 LED,好的。 电机,甚至不用考虑它。
I2C (Inter-Integrated Circuit): it allows to connect with hardwares that support the I2C protocol.