- Python Programming with Raspberry Pi
- Sai Yamanoor Srihari Yamanoor
- 139字
- 2021-07-02 23:48:46
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
推薦閱讀
- Hands-On Intelligent Agents with OpenAI Gym
- Managing Mission:Critical Domains and DNS
- Python Data Science Essentials
- VB語言程序設計
- Embedded Programming with Modern C++ Cookbook
- 計算機組網技術
- IBM? SmartCloud? Essentials
- 網絡脆弱性掃描產品原理及應用
- 基于RPA技術財務機器人的應用與研究
- 精通ROS機器人編程(原書第2版)
- 菜鳥起飛五筆打字高手
- 網絡安全原理與應用
- Mastering SQL Server 2014 Data Mining
- 淘寶網店頁面設計、布局、配色、裝修一本通
- Outlook時間管理秘笈