- 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
推薦閱讀
- 大數(shù)據(jù)項(xiàng)目管理:從規(guī)劃到實(shí)現(xiàn)
- 21天學(xué)通PHP
- Mobile DevOps
- Julia 1.0 Programming
- VB語(yǔ)言程序設(shè)計(jì)
- 大數(shù)據(jù)平臺(tái)異常檢測(cè)分析系統(tǒng)的若干關(guān)鍵技術(shù)研究
- 網(wǎng)絡(luò)組建與互聯(lián)
- 嵌入式操作系統(tǒng)
- 大數(shù)據(jù)驅(qū)動(dòng)的設(shè)備健康預(yù)測(cè)及維護(hù)決策優(yōu)化
- Ruby on Rails敏捷開(kāi)發(fā)最佳實(shí)踐
- 基于單片機(jī)的嵌入式工程開(kāi)發(fā)詳解
- 手機(jī)游戲程序開(kāi)發(fā)
- SMS 2003部署與操作深入指南
- 單片機(jī)C51應(yīng)用技術(shù)
- 軟測(cè)之魂