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

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.

主站蜘蛛池模板: 东安县| 淮北市| 琼结县| 南康市| 临邑县| 玛纳斯县| 兴仁县| 开化县| 西乌珠穆沁旗| 祁阳县| 贺州市| 巫溪县| 万年县| 罗平县| 淳化县| 仁布县| 乐陵市| 什邡市| 全南县| 沭阳县| 新晃| 三亚市| 巢湖市| 资源县| 明溪县| 大理市| 嵊泗县| 荔波县| 象州县| 都安| 永春县| 木里| 宣城市| 绍兴市| 旺苍县| 元谋县| 河间市| 弥勒县| 祁阳县| 靖宇县| 台安县|