Chapter 3. Simple projects: input and output

This chapter covers

  • Looking at the analog world
  • Reading an analog input
  • Producing sound from a speaker
  • Building a pentatonic keyboard

In the previous chapter, we looked at the digital side of the Arduino, building a series of incremental projects that showed off Arduino features like digital inputs and outputs and interrupts. In this chapter we’re going to look at another aspect of the Arduino and how it interfaces with the world around us.

In basic terms, the world around us can be split into two parts—digital and analog—and in this chapter we’re going to investigate interacting with the analog part. We’ll once again start from a basic component, a potentiometer, which reads analog inputs ...

Get Arduino in Action 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.