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

Conditional Statements, Functions, and Lists

In this chapter, we will build upon what you learned in the previous chapter. You will learn about conditional statements and how to make use of logical operators to check conditions using conditional statements. Next, you will learn to write simple functions in Python and discuss interfacing inputs to the Raspberry Pi's GPIO header using a tactile switch (momentary push button). We will also discuss motor control (this is a run-up to the final project) using the Raspberry Pi Zero and control the motors using the switch inputs. Let's get to it!
In this chapter, we will discuss the following topics:

  • Conditional statements in Python
    •  Using conditional inputs to take actions based on GPIO pin states
    • Breaking out of loops using conditional statement
  • Functions in Python
    • GPIO callback functions
  • Motor control in Python
主站蜘蛛池模板: 延安市| 辛集市| 罗平县| 烟台市| 吕梁市| 石渠县| 集贤县| 沙坪坝区| 华宁县| 武安市| 定州市| 丹江口市| 响水县| 清镇市| 万山特区| 沂源县| 亳州市| 湖口县| 井冈山市| 武城县| 垣曲县| 兴和县| 依兰县| 泉州市| 常德市| 香格里拉县| 平潭县| 桓台县| 涟水县| 南安市| 浑源县| 崇仁县| 晋中市| 林芝县| 涿州市| 富阳市| 屏山县| 苍溪县| 霍州市| 黎川县| 泸水县|