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

An ambient light meter circuit

Here, you have my proposed circuit to be used as our first analog input example:

An ambient light meter circuit

An ambient light meter circuit schematic

It has a voltage divider consisting of the photocell and a 10K ohm load resistor as the input circuit, just like the one I showed you in the previous section.

Regarding the output part of this circuit and trying to keep things simple, I have reused the assembly of the traffic light, but this time, we will use it as a level indicator with four possible states: low, medium, high, and maximum, being represented by none, one, two, or three turned-on LEDs.

From the point of view of used pins, I have connected ...

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