Step 11: Controller software - install

Picture of Controller software - install

The setup is ready to test! The software you use to control it is a little application written in Processing. You can run this from the source code, but it's probably easier to use one of the pre-compiled binaries that I've made. The most recent code bundle has the latest versions for Mac, Windows or linux.

(That bundle also includes all the source for the controller, and the firmware, and all the Processing and Arduino libraries you need to run from source.)

Download it, unzip it, and run the executable in the controller folder. It'll open up very small, but maximise the window to see more. It will automatically create a default configuration file in the same folder as it runs in, and you should then click "save properties" in the top-left corner to save the new window size as the default.

Compile from source

If you're curious about Processing, you're right to be: It's ace. There are useful tutorials on processing.org, and of course here on Instructables too. It's basically java, but optimised to run little stand alone programs with graphics. If you're interested in keeping on the leading edge of the controller development, you might like to check out the code directly from the repository and compile it yourself. Another reason: The precompiled binaries that I distribute are a little idiosyncratic, and sometimes refuse to work on some people's machines. If you compile from source, then it'll work at least.

Couple of notes - The controller is getting a bit long-in-the-tooth now, and I haven't updated it to use Processing 2. So in the meantime, it will only compile in Processing 1.x. Additionally, the libraries have also since moved on since it was written, and it'll only work with the versions in the zip file (referred to above). I'm working on an update, but it's not ready yet.

  1. Install Processing 1.5 (download:http://processing.googlecode.com/files/processing-1.5.1-windows.zip)
  2. Run Processing, find where your sketchbook folder is: (File->Preferences, sketchbook location).
  3. Install libaries: Unzip the code bundle, and copy the contents of the processing-source/Processing libraries into <sketchbook location>/libraries.
  4. Install project: In the code bundle, copy the whole processing-source/polargraphcontroller folder into <sketchbook location>.
  5. Restart Processing, and open the controller with File->Sketchbook->polargraphcontroller.
  6. Run: When some files have opened up and you can see some code, hit the play button in the toolbar (or use Ctrl-R) and you should see the controller spring into live.

It'll only be a small window, so go ahead and maximise it, or stretch it so you can see everything. If it worked, then well done. NEXT!

Remove these adsRemove these ads by Signing Up
lanthan3 years ago
Very nice, outstanding instructable!
At this point, ControlP5 and geomerative libraries installed, code downloaded from svn today, I am stuck (Processing 1.5.1, current Ubuntu release) when trying to run the sketch:
error in line 140 of Panel.pde c.setSize((int)cSize.x, (int)cSize.y);
error msg: "The function setSize(int,int) does not exist"
If I comment this line out, the next error is in line 182 of the same file
"the function getBackground() does not exist"
then line 189 of the same "The function setLock(boolean) does not exist"

if I comment the last one, the controller runs (still signals a RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2
but this is not fatal.
So it is like a library or set of functions might be missing. Any hints? Thank you!
lanthan lanthan3 years ago
Never mind, solved it: was a mismatch of versions of the ControlP5 libraries. It is very important to use the one from the link provided by the polargraph instructions, dated from october 5, 2010.
Euphy (author)  lanthan3 years ago
Good stuff, I hoped it was that. The ControlP5 library has seen a lot of development up to now, but there hasn't been an official release for years. I'll add a note to make it clearer that you need that version from 2010.

SnyperBob3 years ago

I have another question about this step (11). With the newest updates you made to your code, do I now have to copy ALL 11 of the files from your code site, branch polargraphcontroller_zoom, into the sketch folder for Processing?

Thank you
More information in regards to what I'm asking...

I downloaded from your site: polargraphcontroller1.0.2.windows32.zip
I'm running WinXP

I installed Processing, latest version, and see folder here: My Documents/Processing

I created a new folder in that folder called polargraphcontroller.

So, my question is, what files do I need to copy into: My Documents/Processing/polargraphcontroller
from your zip file? Do I need to copy the source folder from your zip file, there are 11 files in that folder.
I copied those 11 files into: My Documents/Processing/polargraphcontroller

but nothing shows up when I run Processing and click on File->Sketchbook . I have closed Processing and tried reopening, but nothing is displayed
Euphy (author)  SnyperBob3 years ago
SnyperBob, the instructions here are really only good for the older version, the one called processingcontroller.pde. That is a simpler installation.

The reason the files aren't showing up inside processing is that the name of the pde has to match the name of the folder it's in. So if you've downloaded polargraphcontroller_zoom, then it needs to be in a folder called /polargraphcontroller_zoom/. And yes, all the polargraph files would need to be in that same folder.

That said, you also need to get the controlP5 library and the geomerative library too, so I'd recommend using the precompiled binaries. And you've already got that (polargraphcontroller1.0.2.windows32.zip), so wherever you unpack it, just run the executable file that's in the root of wherever you unpacked it to. It'll be called polargraphcontroller_zoom.exe. You still need to change the serial port in the configuration file, but other than that, it's simple - don't even need processing installed for it.

You may find that the new software is not quite ready for primetime, and in particular I think it struggles with some image resizing issues.

Good luck!
SnyperBob Euphy3 years ago
Thanks for the tip! Sorry for all the newbie questions on getting this up and running. I'm new to Arduino and really like this project!

Ok, so based on what you told me, I just extracted the polargraphcontroller.1.0.2.windows32.zip file

I ran polargraphcontroller_zoom.exe and it opens up fine. I closed out of the program and then updated polargraph.properties.txt file with my correct serial port for my Arduino UNO.

When I open polargraphcontroller_zoom.exe again, it just says No Serial Connection at the top of the screen.

My next question is.....do I need to load a sketch onto my Arduino in order to get it to talk to polargraphcontroller_zoom.exe?

Right now, the last sketch loaded onto my Arduino is Blink. Do I need to clear off that sketch or something in order for my Arduino to talk to the computer?

I read this Instructable many times and I just seem to be missing something here. I'm guessing it's like you said, these directions are for the older version of your software. I'm looking for any more tips to get the software talking to the Arduino.

Thank you
Euphy (author)  SnyperBob3 years ago
Yep Snyper, you need to upload the server code onto the arduino itself - step 8 has the instructions for that.

Also, the value you need to put into the properties.txt is not the same number as your COM port - like, if you have COM14, then you wouldn't enter "14".

What it actually needs is the position of the com port in a list of all com ports on your system. So you would enter "0" if you wanted to connect to the first COM port, "1" if you wanted to connect to the second, etc.

On all my windows machines the arduino pops up in the second com port, so I always have "1" as my COM port in the file. The actual name of the port varies, depending on which arduino I have plugged in, so it can be COM14, COM31, COM5 etc. This is the bit that doesn't really work yet in the new controller software.
SnyperBob Euphy3 years ago
Oh, thanks for explaining this. I am now going to try to get the older version of your software up and running, until I know a little bit more about how it all works and get more comfortable with it all.

Running the older version, with the COM port setting that you explained, after manually installing all the libraries, loading the server onto the Arduino, I am now able to run the program!

It comes up, says it's connected via the COM port, and I can load an image into the program. I'll re read all of the other steps again and try to learn more about how to use the polargraphcontroller program.

Thanks again for all you've done!
Hey, me again.
Ok. So I downloaded Processing just fine and found the folder on my computer and created the polargraphcontroller folder within, but how exactly do I download the source code. I opened it up and was able to look at it but didnt know where to go from there. This is probably a really lame question, but I am completely new at this stuff.
Thanks for the help thus far,