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

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
主站蜘蛛池模板: 星座| 鄂温| 墨江| 新田县| 清水河县| 岳西县| 保靖县| 西昌市| 徐州市| 罗田县| 金阳县| 迭部县| 白沙| 如皋市| 玉田县| 定边县| 象州县| 安乡县| 砀山县| 无锡市| 凤庆县| 合江县| 五莲县| 文成县| 阿拉善左旗| 常山县| 阿坝县| 长岭县| 习水县| 凉城县| 邛崃市| 大洼县| 南康市| 吴堡县| 鞍山市| 合川市| 安达市| 古蔺县| 新竹市| 鹤山市| 萨嘎县|