O'Reilly logo

Professional Android Open Accessory Programming with Arduino by David Cuartielles Ruiz, Andreas Goransson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7

Digital Arduino

WHAT’S IN THIS CHAPTER?

  • Building Arduino prototypes
  • Digital signals vs. voltage levels
  • Digital actuators: LEDs and lamps
  • Digital sensors: buttons, switches, and tilt sensors

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=1118454766 on the Download Code tab. The code is in the Chapter 7 download and individually named according to the names throughout the chapter.

In the broadest sense, digital electronics deal with circuits that can perform logic operations, such as comparisons between variables, mathematical ones, like multiplications or subtractions, and reading/writing ones, as in checking whether a pin is HIGH or LOW or turning one of those pins ON or OFF. The Arduino prototyping platform runs on top of a digital brain, which enables the different pins on an Arduino board to read and write digital signals.

Typically, the existing digital technologies map the two binary levels to 0 Volts (logic 0) and 5 Volts (logic 1). They correspond to the logical levels of LOW and HIGH, but also to the boolean values FALSE and TRUE, respectively.

You can control LEDs, servo motors, and other devices directly from the pins on the Arduino board. If you want to drive devices that demand more current or work at higher voltages, like lamps or powerful motors, you will need to use either transistors or relays.

With sensors, you can read an input from any device that puts out voltage levels ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required