O'Reilly logo

Beginning Arduino Programming by Brian Evans

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

Analog Serial Monitor

So far, we have made the general assumption that the readings we are receiving from the analog input pins are providing a range of values from 0 to 1023, but this  is rarely the case, as you can see in our opening project's source code. The reason for this is that every sensor is a little different and will provide a varying range of voltages depending on what they are sensing. In order to better understand the range of values that a particular sensor is providing, we need to create a sketch to give us some visual representation of the values reported by the ADC. Before getting to that, let's back up again and look at a simpler analog sensor, as shown in Figures 6-5 and 6-6.

Figure 6-5. Photocell schematic

Figure ...

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