You will also need to adjust MakerPlot’s vertical scale
to a different value to see the entire plot. This is done by
clicking the DBL button under the Y-Axis menu (Figure 9)
a couple of times until it gets to 1000, which is just below
the pot’s maximum value of 1023; the Atmel 328P micro
in the Uno has a 10-bit ADC, so the raw values range
from 0 to 1023.
If you want, you can fine-tune the Y axis setting by
keying in 1050 in the MAX box. Just make
sure to depress the Enter key after you put
in this value. Now, the Y axis goes from 0
to 1050, and you can see all of the pot
values going from 0 to 1023 (Figure 10).
Scaling the Analog Data
Up until now, we have been plotting
the raw 10-bit A2D value that’s generated
by varying the potentiometer shaft. Since
our pot is connected between five volts and ground, the
actual voltage that’s going into the A2D pin (A0) is what
we really want to be plotting. There are two ways to do
this. One way is to code the math in the sketch and
output the result via the serial link as a series of ASCII
characters, or let MakerPlot do it. For this example, we’ll
defer to the latter since it will be easier and will also show
you a neat MakerPlot feature.
54 December 2013
Figure 7. Control menu panel.
Figure 8. Begin
plotting raw data.
Figure 9. Increase Y axis to 1000.
Figure 6. Standard