Chapter 2 (2nd Edition)

If you are looking for the Chapter 2 content for the 1st Edition of Exploring Arduino, please click here.

Digital Inputs, Outputs, and Pulse-Width Modulation

Parts List


Download Code (2nd Edition, Chapter 2)
(Also available on GitHub)

Useful Links


  • On page 46, the closing curly bracket is missing from the loop() function of code listing 2-6 (rgb_nightlight.ino). The downloadable code correctly includes the missing bracket – the issue is only in print.


This video will teach you about digital inputs/outputs, debouncing, and PWM:

This video will teach you the basics of electrical and computer engineering: