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

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.

主站蜘蛛池模板: 隆回县| 乌拉特后旗| 新和县| 禹州市| 独山县| 肃宁县| 洛川县| 乌兰浩特市| 洪雅县| 石河子市| 论坛| 峡江县| 丹阳市| 遂昌县| 邛崃市| 民乐县| 山东| 韩城市| 尼勒克县| 阿图什市| 祁门县| 恩平市| 洪洞县| 本溪市| 中西区| 四川省| 金湖县| 平山县| 平度市| 晋江市| 介休市| 巫溪县| 洞头县| 尉犁县| 溧水县| 休宁县| 张家港市| 佛坪县| 东乡| 盘山县| 旌德县|