Skip to Content
Exploring Arduino, 2nd Edition
book

Exploring Arduino, 2nd Edition

by Jeremy Blum
November 2019
Beginner
512 pages
11h 50m
English
Wiley
Content preview from Exploring Arduino, 2nd Edition

2Digital Inputs, Outputs, and Pulse-Width Modulation

What You'll Need for This Chapter:

  1. Arduino Uno or Adafruit METRO 328
  2. USB cable (Type A to B for Uno, Type A to Micro-B for METRO)
  3. Half-size or full-size breadboard
  4. Assorted jumper wires
  5. Pushbutton
  6. 220Ω resistors (×3)
  7. 10kΩ resistor
  8. 5mm red LED
  9. 5mm common-anode RGB LED

Blinking an LED is great, as you learned in the preceding chapter, but what makes the Arduino microcontroller platform so useful is that the system is equipped with both inputs and outputs. By combining both, your opportunities are nearly limitless. For example, you can use a magnetic reed switch to play music when your door opens, create an electronic lockbox, or build a light-up musical instrument!

In this chapter, you will start to learn the skills you need to build projects like these. You'll explore the Arduino's digital input capabilities, learn about pull-up and pull-down resistors, and learn how to control digital outputs. Most Arduinos do not have an analog output, but it is possible to use digital pulse-width modulation (PWM) to emulate it in many scenarios. You will learn about generating pulse-width modulated signals in this chapter. You will also learn how to debounce ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Electronics for Inventors, Fourth Edition, 4th Edition

Practical Electronics for Inventors, Fourth Edition, 4th Edition

Paul Scherz, Simon Monk

Publisher Resources

ISBN: 9781119405375Purchase book