Using Stamp Plot as a GUI for Serial Output

Go Back

And yes I fully realise the most likely response to the above title is going to be "you what?" and so allow me to elaborate somewhat. Stamp Plot is a very nice piece of Software which is free to home and educational users and fairly cheap to licence for everybody else. It takes the serial output from your Arduino and reads it, and from that it can form a graph of the values of the output. This saves you having to code up a Visual Basic thing to do it or using Processing. Moreover, Stamp Plot can record and save data, and you can build your own GUI with it.


The first thing to do before you can actually use it is of course to get it. Click on the link on the left and scroll down the page. Towards the bottom end you will find StampPlot Pro Version: 7.5  and that's what we want.

When it's all up and running and you open it you will see a page that looks like this.

Get Stamp Plot




Click OK in the middle box to make the splash disappear and you end up with a selection panel:


There's a bewildering array of gewgaws to choose from but what we run is the no-frills plot as indicated by the red pointer above. Click on it and you end up with something like this:


The X axis is set for time and by default it goes to 120 seconds so we'll leave it. The Y axis is going to measure a voltage at pin A0 of the Arduino. The scale is too big. Alter it by clicking on the Axis menu and then Analog Max:

analogmaxmenu maxbox

When you click on Analog max a box like the one on the left will pop up. Type 5 into it and hit OK. The Y axis will now change to show values 0-5 in steps of 0.5.


If you want to click on the Y axis label in the same menu. Type in the words "Voltage at A0" and the label will appear at the side of the Y axis.

Spiffing. Now we are ready to build a circuit and code up a sketch to work with the plot we have just made. Here's the hardware shown as both a schematic and a breadboard design:


It really is just a 10k pot attached between 5V and GND with a connection from the wiper to A0.

This provides a varying voltage, depending on how far one way or the other the pot is, and that's what the plot is going to measure.


Here's a sketch to upload to your Arduino:

/* Stamp plot values are data:  use default data (comma separated ASCII)

Flush old data.

port:Serial bits 8, parity N and stop bits 1



float outvariable=0;

boolean onstate=false;

unsigned long timethen=0;

void setup(){




void loop(){




Over the page we look at how the Arduino and Stamp Plot connect to each other and what happens when they do.

More >