- Mastering Arduino
- Jon Hoffman
- 162字
- 2021-07-23 18:57:38
PWM pins
Where the analog input pins are designed to read analog sensors (input), the PWM pins are designed for output. PWM is a technique for obtaining analog results with digital output.
Since a digital output can be either on or off, to obtain the analog output the digital output is switch between HIGH and LOW rapidly. The percentage of the time that the signal is high is called the duty cycle. The following diagram illustrates this concept:

We have the ability to set the frequency of how fast the signal can switch between HIGH and LOW. This frequency is measured in Hertz and sets how many times the signal can switch per second. For example, if we set the frequency to 500 Hz, that would mean that the signal could switch 500 times a second.
We will be using the PWM pins for several examples in this book and will examine them more when we learn how to program the Arduino.
- 孩子愛問的十萬個(gè)為什么·科學(xué)
- 萬物發(fā)明指南
- 身邊有科學(xué):妙趣橫生的數(shù)學(xué)
- 國民閱讀文庫·探索發(fā)現(xiàn)系列:人與自然神秘現(xiàn)象之謎
- 轉(zhuǎn)換視角看科學(xué)
- 華東理工大學(xué)年鑒2010
- 科學(xué)與方法(漢譯世界學(xué)術(shù)名著叢書)
- 灰度決策:如何處理復(fù)雜、棘手、高風(fēng)險(xiǎn)的難題
- 蔚藍(lán)旖旎的海洋
- 上一節(jié)高階閱讀課:特級教師閆學(xué)經(jīng)典課例
- 科學(xué)的價(jià)值(漢譯世界學(xué)術(shù)名著叢書)
- 我的第一本科學(xué)游戲書2
- 中外創(chuàng)造學(xué)發(fā)展比較研究
- 國際科學(xué)前沿重點(diǎn)領(lǐng)域和方向發(fā)展態(tài)勢報(bào)告2020
- 分岔問題及其計(jì)算方法