The analog output circuit

Once we know what is going to happen when we deal with analog outputs, I'll show you the circuit we are going to work with.

The analog output circuit

The circuit to connect an LED to a PWM pin

As you can see in the previous schematic, it's very similar to the circuit we used in Chapter 3, Interacting with the Environment the Digital Way, to deal digitally with an LED. However, in this case, we have to connect it to a PWM pin of the Arduino, pin 11 for this example, so that later in the program we can use the corresponding code to deal with it analogically.

The rest of the circuit is just the same as the blinking LED one, and we will use the same 220 ...

Get Arduino Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.