官术网_书友最值得收藏!

Wiring connections

Connecting the LED to the Raspberry Pi is straightforward. Before doing this, however, let's take a closer look at the pins of the LED:

The LED contains one positive pin and one negative pin. The long pin is the positive pin, which you can connect to any data pin of the Raspberry Pi. The short pin is the negative pin, which can be connected to the ground pin of the Raspberry Pi.

Let's connect it up. First, connect the negative pin of the LED to the ground pin (physical pin number 6) of the Raspberry Pi. Next, connect the positive pin of the LED to wiringPi pin number 15:

 

Now the we've connected the LED to the Raspberry Pi, let's write a program to make the LED blink.

主站蜘蛛池模板: 石泉县| 通河县| 遵义县| 弋阳县| 巫山县| 环江| 宣威市| 宽城| 威宁| 临夏县| 盐山县| 石渠县| 保定市| 阿拉善右旗| 贵州省| 电白县| 丰城市| 黄陵县| 高淳县| 洛宁县| 鄂尔多斯市| 延安市| 哈巴河县| 石门县| 高陵县| 灵武市| 霍林郭勒市| 土默特左旗| 河北省| 松溪县| 丹江口市| 大竹县| 旬阳县| 巧家县| 长海县| 吴忠市| 社旗县| 新邵县| 新巴尔虎右旗| 西乌珠穆沁旗| 神池县|