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

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
主站蜘蛛池模板: 竹山县| 上思县| 宣城市| 峨边| 和田县| 泸水县| 临澧县| 内乡县| 山阴县| 斗六市| 六枝特区| 三亚市| 诏安县| 乡宁县| 昭苏县| 广州市| 五台县| 鹤山市| 凌海市| 遂宁市| 图木舒克市| 南江县| 昌黎县| 襄樊市| 屯门区| 顺平县| 望城县| 洮南市| 绩溪县| 文登市| 峡江县| 淮滨县| 荆州市| 惠来县| 韩城市| 洪雅县| 贵港市| 义乌市| 登封市| 太康县| 新巴尔虎右旗|