Raspberry Pi 2 型号 B - 单声道 C# PIN 编号

Raspberry Pi 2 model B - Mono C# PIN numbering

我有 Raspberry Pi 2 个模型 B。我使用 https://github.com/cypherkey/RaspberryPi.Net 在 C# 中编写应用程序。我的 PIN 编号有问题。

我什么都试过了,还是不行。

谁能告诉我在哪里可以获得 PIN 码?

例如:当我在 PIN GPIO17 上有任何东西时(http://elinux.org/File:Pi-GPIO-header.png 在这个 table 上),我如何从 C# 定位它?

项目描述建议

using Mike McCauley's BCM2835 library which is available here.

documentation 然后声明

Pin Numbering

The GPIO pin numbering as used by RPi is different to and inconsistent with the underlying BCM 2835 chip pin numbering. http://elinux.org/RPi_BCM2835_GPIOs

...

The functions in this library are designed to be passed the BCM 2835 GPIO pin number and not the RPi pin number. There are symbolic definitions for each of the available pins that you should use for convenience. See RPiGPIOPin.

幸运的是,这些不同的编号方案由 GPIOPins enum 解决,两者均根据 BCM GPIO 引脚编号(第一个示例)和连接器 P1 上的 GPIO 引脚(第二个示例)定义:

V2_GPIO_00 = 0,
V2_Pin_P1_03 = 2,

要选择连接器上的引脚,请使用 _Pin_P1_nn 表示法。请注意 Pi 的不同类型和版本的不同定义。