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

Wiring up the electronics

We need to wire up our electronic parts, as shown in the following image:

Make sure that your Pi Zero is switched off when you are soldering the cables to the Pi or the header pins! You will also need to take care when wiring your LEDs, as we must get the correct legs attached to the positive and negative wires in our circuit, or they will not work. The positive leg of an LED is usually longer, and there is often a flat edge on the LED to indicate which is the negative leg. We are also going to introduce a 330 Ω resistor between the LED and the ground of the Pi; this is done to stop the LED drawing too much current from the Pi and damaging it.

You may want to introduce a little electrical insulating tape around one leg of each LED to ensure that they do not short circuit by touching the other leg. Once you have soldered your components together, give them a final check over to make sure they are in the correct GPIO holes on the Pi and that you have a good connection at each joint.

Now that we have completed the wiring of our electronics, we can move on to writing the code to control it all. Plug in your Pi and establish a SSH connection to it.

主站蜘蛛池模板: 安陆市| 大方县| 巫溪县| 衡东县| 迁安市| 连平县| 沂源县| 且末县| 滁州市| 泉州市| 三门峡市| 游戏| 上林县| 云南省| 连州市| 乃东县| 内黄县| 阳新县| 兴义市| 浑源县| 进贤县| 塔城市| 定襄县| 陕西省| 宁南县| 宜川县| 维西| 昭通市| 万全县| 周口市| 文成县| 离岛区| 安远县| 察雅县| 寿宁县| 德江县| 安图县| 凤翔县| 黑河市| 晴隆县| 陵水|