- 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.
- 孩子愛問的十萬個為什么·科學(xué)
- 國民閱讀文庫·探索發(fā)現(xiàn)系列:人與自然神秘現(xiàn)象之謎
- 科技原創(chuàng)苦旅
- 小學(xué)科學(xué)教師入門十課
- 研究團(tuán)隊建設(shè)的制度環(huán)境考察
- 發(fā)現(xiàn)未來:重塑世界的五大發(fā)明
- 科技創(chuàng)新300年
- 自然哲學(xué)筆記
- 溫儒敏論語文教育
- 干旱缺水的荒漠:沙漠(探究式科普叢書)
- 古代審計知識(下)
- 京津冀環(huán)境保護(hù)歷史、現(xiàn)狀和對策
- 師夷長技(中國近現(xiàn)代科技轉(zhuǎn)型的歷史軌跡與哲學(xué)反思 第二卷)
- Mastering Arduino
- 失實:為什么我們所知道的一切,有一半可能都將是錯的