Digital Inputs, Outputs, and Pulse‐Width Modulation

Jeremy Blum · 2019

This chapter explains what makes the Arduino microcontroller platform so useful is that the system is equipped with both inputs and outputs. By combining both, the reader's opportunities are nearly limitless. For example, the reader can use a magnetic reed switch to play music when the door opens, create an electronic lockbox, or build a light-up musical instrument. The chapter helps the reader explore the Arduino's digital input capabilities, learn about pull-up and pull-down resistors, and learn how to control digital outputs. It explains the details of generating pulse-width modulated signals and shows how to debounce digital switches, a key skill when reading human input. The chapter shows the reader how to build and program a controllable Red, Green, Blue (RGB) LED nightlight. It also shows how to pick a resistor to current-limit an LED, read a pushbutton, and utilize the resistors.

Read the paper · More papers on PaperTik