树莓派gpio和python入门

介绍 (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
Source. 来源

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值