- 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
推薦閱讀
- 課課通計算機原理
- 大學計算機信息技術導論
- ArchiCAD 19:The Definitive Guide
- 構建高質量的C#代碼
- Hands-On Internet of Things with MQTT
- Go Machine Learning Projects
- Verilog HDL數字系統設計入門與應用實例
- Photoshop CS4經典380例
- 網絡綜合布線技術
- Mastering Machine Learning Algorithms
- Android游戲開發案例與關鍵技術
- Ruby on Rails敏捷開發最佳實踐
- 氣動系統裝調與PLC控制
- 統計挖掘與機器學習:大數據預測建模和分析技術(原書第3版)
- INSTANT Adobe Story Starter