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 Ohms resistance to limit the current that will flow through the LED to no more than 20 mA.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset