O'Reilly logo

Arduino Essentials by Francis Perea

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

Complete circuit schematic

Here, you have the complete circuit schematic for this example. As you can see, the connection point between the switch and the resistor is connected to the Arduino pin number 7 in this example, and we will use pin number 9 as an output to connect the LED that we will use to blink or fade.

Given that we will deal with the LED as a digital or analog device up to the pressing of the button, we have to connect it to the Arduino board through any of the PWM pins that will allow us to use it with the digitalWrite() or analogWrite() functions.

The only consideration to be made about this circuit is regarding the right connection of the momentary button we will use, and we have talked about this in the previous paragraph.

A blink ...

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