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

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.

主站蜘蛛池模板: 尖扎县| 曲麻莱县| 出国| 牟定县| 宝清县| 拜泉县| 东光县| 布尔津县| 仲巴县| 综艺| 衡南县| 吉安县| 五大连池市| 淮北市| 若羌县| 汤原县| 定结县| 侯马市| 英山县| 凌源市| 罗定市| 洛川县| 渭源县| 肇东市| 潢川县| 稻城县| 邵东县| 栾城县| 青田县| 湘乡市| 永顺县| 岫岩| 根河市| 闽侯县| 南阳市| 苍山县| 东平县| 右玉县| 冀州市| 民和| 桃园县|