官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 宁国市| 天水市| 盈江县| 师宗县| 华宁县| 读书| 黄山市| 萨嘎县| 邵武市| 新安县| 吉隆县| 平果县| 布拖县| 中超| 汤原县| 克东县| 绥化市| 田阳县| 郴州市| 扎鲁特旗| 黑龙江省| 舒兰市| 浑源县| 新竹县| 永州市| 内丘县| 广州市| 长兴县| 永靖县| 黄石市| 阿勒泰市| 青州市| 布尔津县| 兴业县| 扶风县| 徐水县| 北碚区| 辽阳县| 宣汉县| 平谷区| 个旧市|