© Jonathan Bartlett 2020
J. BartlettElectronics for Beginnershttps://doi.org/10.1007/978-1-4842-5979-5_15

15. Analog Input and Output on an Arduino

Jonathan Bartlett1 
(1)
Tulsa, OK, USA
 

In Chapter 14, we learned how to do basic digital input and output with an Arduino using its I/O pins. In this chapter, we will cover how to do analog input and output as well.

15.1 Reading Analog Inputs

So far we have been focusing on digital input and output—HIGH and LOW states. The Arduino Uno also supports some amount of analog input (through its analog pins) and a sort of “faked” analog output (through its pulse-width modulation (PWM) pins, which will be covered in the next section).

On the Arduino Uno, the analog input pins are grouped together in a section labeled ...

Get Electronics for Beginners: A Practical Introduction to Schematics, Circuits, and Microcontrollers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.