Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter you learned what an output pin on an ADK board is and what it is capable of. In the first project of this chapter you saw how to use an output pin in a digital context to switch a simple LED on and off by providing either 5V or 0V when the output is switched to HIGH or LOW. The second project introduced the PWM or pulse-width modulation mode of digital outputs where an output pin can emit a range of output voltages from 0V to 5V. To give the user the control about the value transmitted to the ADK board you used two different Android UI elements: the ToggleButton to switch the LED on and off in a digital context, and the SeekBar to pick from a range of values to dim the LED in an analog context.