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

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
主站蜘蛛池模板: 龙岩市| 郑州市| 威宁| 班玛县| 玉门市| 通江县| 建德市| 清原| 拜泉县| 孟州市| 阳原县| 桂平市| 泰安市| 潼关县| 金阳县| 上栗县| 光泽县| 图们市| 宿松县| 松阳县| 砀山县| 武城县| 公主岭市| 西峡县| 通辽市| 侯马市| 安阳市| 陈巴尔虎旗| 若羌县| 久治县| 永泰县| 青阳县| 河北区| 铅山县| 芮城县| 迁西县| 葵青区| 青浦区| 册亨县| 本溪市| 湖口县|