concept output in category arduino

This is an excerpt from Manning's book Arduino in Action.
The boards have 14 digital pins, each of which can be set as either an input or output, and six analog inputs. In addition, six of the digital pins can be programmed to provide a pulse width modulation (PWM) analog output. A variety of communication protocols are available, including serial, serial peripheral interface bus (SPI), and I2C/TWI. Included on each board as standard features are an in-circuit serial programming (ICSP) header and reset button.
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 into the Arduino. Then we’ll experiment by adding a sensor—a piezo transducer that can be used as an analog input or output. We’ll round up by adding four more piezo transducers and a small speaker to build a working five-key pentatonic keyboard.