Figure 3. Digital interface plotting analog
and digital data.
three lines for a purpose. Notice how the entire string is
bounded by double quotes (“ “); this is important so that
the resulting data within the quotes are translated into
Plotting Analog and Digital Data
// configure for digital data with %[
// current digital data value
Serial.println(“ ADC 8]”);
// use ADC 8 instruction to make 8
// digital channels and end with
// closing] and CR
For this sketch, we’re going to choose the MakerPlot
Digital Interface (Figure 3) since it plots both analog and
digital signals, with the emphasis on digital plotting. With
the Uno physically connected to the PC via the USB cable,
we’ve clicked on the rocker switch at the bottom-left (under
Control) to begin plotting the data. As you can see, the
digital data are at the top (LSB first) and the analog
(potentiometer) data are on the bottom. The pot shaft has
been adjusted back and forth to generate a data plot.
In the first line, MakerPlot uses the percent (%) sign to
distinguish what follows as digital data. Next, comes a
square open parenthesis ([) that MakerPlot uses to bound
the variable. The next line is the value “x” that produces
the digital output. That, in turn, is followed by the
The vertical Y scale is between 0 and 2000 to
accommodate the raw A2D data going from 0 to 1023.
MakerPlot instruction (ADC 8) that tells MakerPlot to
generate eight channels of digital data from the x
value. Then, we round out the data set with a square
closed parenthesis (]). The Serial.println instruction
also terminates the analog and digital strings with a
The Y scale can be changed to any value you choose
using the menu controls on the bottom. You can also
witness the analog data as Analog 0 in the bar graph on
the right side of the plot (Figure 4). The horizontal bar
graph range is currently set to 1000, meaning each one of
Carriage Return character which MakerPlot requires
to know when the data for this field is complete.
Now that the sketch is complete, we’ll copy and
paste it into the Arduino IDE (Integrated
Development Environment), verify it, then load it into
the Uno. Then, we’re ready to do three other things:
1. Plot the analog and digital data.
2. Replay it in the plot area.
3. Data log it.
Figure 4. Analog 0 bar graph.
January 2014 45