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

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.

主站蜘蛛池模板: 泸溪县| 普定县| 保山市| 余庆县| 金堂县| 汕尾市| 赤城县| 翼城县| 海安县| 杭州市| 乌海市| 汽车| 出国| 庄浪县| 紫阳县| 体育| 冷水江市| 佳木斯市| 龙泉市| 安陆市| 东乌珠穆沁旗| 宣武区| 眉山市| 商丘市| 辽阳县| 岗巴县| 靖江市| 九龙县| 黄山市| 巴里| 晋城| 巴青县| 西丰县| 上栗县| 宣汉县| 西畴县| 明溪县| 宣恩县| 博白县| 凉山| 涞源县|