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

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.

主站蜘蛛池模板: 左权县| 湛江市| 邵阳市| 南川市| 安义县| 栾城县| 厦门市| 儋州市| 晋宁县| 克山县| 郯城县| 巴青县| 宁晋县| 翁牛特旗| 开远市| 广宗县| 卢氏县| 平阳县| 阳新县| 普兰县| 四川省| 商水县| 龙口市| 博兴县| 黄浦区| 军事| 日照市| 湘阴县| 新兴县| 都昌县| 瑞安市| 凤城市| 原阳县| 方正县| 黔西| 萨迦县| 梁山县| 台南县| 建始县| 伽师县| 资源县|