of controls and other commands. You don’t even need to
start with an existing Interface like we did; your micro can
handle all of the instructions to build, reset, and configure
it. The sidebar shows an example of this. The ability for on
the fly Interface building is unique to MakerPlot (as far as
we know), and we’ve only shown just a few examples
here. So, feel free to experiment with your application for
a customized Interface builder using your favorite
microcontroller.
powerful software. There’s plenty of info on the MakerPlot
website to keep you going for quite a while. Remember, if
you decide after using your 30 day free trial you want to
purchase it, you can order it through the Nuts & Volts
webstore ( http://store.nutsvolts.com/home.php
?xid=a2d2eb6dd2786e0eb3c058e2aceda572) at a
discounted price.
That’s all for now, so just remember: Got Data –
We hope that you will continue your journey with this
MakerPlot It! NV
The following is an excerpt
from the MakerPlot Guide that
illustrates another example of
creating an entire Interface from an
Arduino microcontroller.
The Guide can be found at
www.makerplot.com. This text is
accompanied by a graphic of the
completed Interface. Note that the
entire Interface is built, configured,
and initialized from the Arduino —
nothing was built on the PC at all.
It's short and sweet, and it gets the
point across.
Creating an Interface
from the Arduino
Creating an Interface entirely from an Arduino.
void MP_Config()
{
Serial.println("!NEWP");
// Start a new plot
Serial.println("!SPAN 0,1000");
// Span Y axis
Serial.println("!POBJ Clear");
// Clear any objects
Serial.println("!PPER 75,100");
// Size plot
// Create meters called 'met1' and 'met2' scaled
// 0 - 1000, auto update on channels 0 and 1.
Serial.println("!POBJ MP_METER_OBJ.met1=78.,93.,
20.,28.,0, 1000,Meter,Blue-Gray,0,1");
Serial.println("!POBJ
MP_METER_OBJ.met2=78.,60.,20.,28.,0,
1000,Meter,Blue-Gray,1,1");
One really interesting aspect of MakerPlot is that all
instructions can come from a variety of sources for total
control. This allows a controller to totally configure
MakerPlot once connected — first, have the controller set
up the interface. Then, have it size the plot and add meters
and other controls for monitoring or interactive control.
The easiest way to do this is to design the Interface
normally, build the Interface, then create code from the
initializations and object code. Be sure to replace any /
with //:
// Create a toggle switch called 'toggle'.
// Add event code
Serial.println("!POBJ
oImgBut.toggle=85.,29.,6.5,14.,dev\\toggle-
sw\\gs_toggle_v_0.gif,0,dev\\toggle-
sw\\gs_toggle_v_1.gif,0");
Serial.println("!POBJ toggle.C='Play click
sound(;)");
Serial.println("~IWAV sw_toggle2.wav");
Serial.println("");
// Extra CR to signal end of event code.
Once you connect, it is created and ready to meter two
channels of analog data, plus allow the switch (toggle) to be
read by your controller.
July 2014 53