Polargraph Controller v2.0, I mean 1.0.

To install:

It’s a bit more complicated than it used to be, sorry about that.

1. Check out this branch of the project: http://code.google.com/p/polargraph/source/browse/#svn%2Fcontroller%2Fbranches%2Fpolargraphcontroller_zoom

You need all of the files.

2. You need these libraries also installed:

Geomerative for SVG import and polygonalisation.

ControlP5 for the GUI.  I’ve tested with 0.5.4 which is the last stable release.

3. Alternatively, get some precompiled binaries.  These are a pain to make, and I can only test the windows versions myself, so there’s a good chance they won’t get updated very often, but they are here.

Changes:

  • SVG import and vector graphics output.  In conjunction with the latest version of the server code, this is now a pleasant reality.  It’s a bit slow, and a little inflexible right now, but I anticipate it’ll get better.  The SVG file is placed at the top-left of the machine, so I’ve been making a file in inkscape that’s the same size as the machine (in px), and drawing my layouts on that.   It is aware of lines only (no fills), and ignores all styles in the SVG.
    I’ve discovered that there is something like an incompatibility between the way inkscape exports text outlines and the way geomerative imports them though, that results in some of the centres of the letters being offset a bit.  Not sure why, but if I break the object into its constituent paths, (Path->Break Apart) then it’s solved.  Go figure.
  • Zooming and panning on the machine.  Use the mouse wheel to zoom the machine, and a middle button drag to move the machine.  This should let it be usable for most screens.
  • Adaptable button panels. They’ll stack to fit on the screen.
  • New GUI library.  I’m using ControlP5 to handle the buttons and tabs, and there’s a few nice things in that like the number spinners too.  It’s pretty good.
  • More sensible controls.  How to select an area is more obvious.  Buttons are disabled when not usable, buttons can toggle on and off too.
  • Machine designer.  The setup tab lets you define machine sizes, page sizes, page positions and pen width test settings.  You should save your properties and restart if you change the mmPerRev and stepsPerRev settings. The only thing you need to edit manually now is the serial port.  I’ll fix that shortly.
  • Queue path preview.  This looks for C01 (move pen) and C17 (move pen in straight line) commands in the queue and draws them on the machine.
  • Row size is now grid size.
  • Pixel threshold.  Use the bright pixel and dark pixel number spinners to ignore pixels at either end of the spectrum.  Chroma keying is reinstated (mask with bright green).

Please have a go and see what you reckon.

Almost forgot – AccelStepper has been officially upgraded to work with Arduino 1.0.  Don’t use my branch.

13 thoughts on “Polargraph Controller v2.0, I mean 1.0.

  1. Hi! I’m having trouble with the verifying the arduino code.
    I get a whole lot of these errors.
    “polargraph.cpp: In function ‘void loadMachineSpecFromEeprom()’:
    polargraph:199: error: ‘F’ was not declared in this scope”

    What am I doing wrong?
    I can verify that the precompiled mac binary opens and seems functional, but I don’t have the arduino far along enough in order to really test it.

    _Ross

  2. Sandy, fantastic update to the controler, the SVG import and draw is so cool.

    Pixel threshold works much better with the dark pixel minimum threshold set to 0 insted of 1 in the ‘controlesSetup’ file.

  3. hi there!
    I have an issue in the DisplayMachine.pde file,

    the line RPoint[][] pointPaths = loadedShape.getPointsInPaths();
    throws at me an error. – Cannot find anything named “loadedShape” –

    The pre compiled version seems to work fine,,I’ll give it a try tomorrow.
    Nice work on the GUI by the way!

  4. Hi Sandy and all the other Polargraph friends out there,

    i’ve got a problem with the now Code. I tried to use the new Software an plot some Vectors. Uploading the new servercode via aduino 1.0 was no problem at all. Also starting the precompiled windows binary. Everything went as usual in the Controller. But when i hit draw vector and set to polagraph to go something wierd happens. The gondola goes from homepoint to the startingpoint of the Vectorgraphic. The servo motor sets the gondola down. Then the gondola drives all the way down the machine and further on. Luckily my counterweights stop the gondola from falling off the machine, but the motors dont’t stop to go round. Stopping the machine in the controller has no effect, only thing that works is pulling the USB ant the powercable.
    I allready tried different SVGs and reuploaded the servercode serverall times.
    Anyone knows whats wrong?

    Stephan

    • Hey Stephan, sorry about that, I made a goof with two bits: Uploading the machine size to the machine did it in steps rather than mm, so it was much too high, and also the set home command wasn’t working properly.

      The result was that C01 commands (move fast as possible) were fine because they don’t require the machine to work out where anything is, but C17 (move in a straight line) made the gondola head for the hills because it thought the machine was 20 times bigger than it really was and it had far to go.

      What you needed to do to stop it was pause the queue (or clear it), and then reset the machine.

      It was fixed a while ago, but the fix was in the code repo rather than the binaries. I’ve just made new binaries, so give them a shot. You’ll need to re-upload your machine sizes to the machine.

  5. Love what you have done! I have built a drbo out of plexiglass and everything is going great with the assembly with the exception of the software. I am running linux (lxde) and most of the links and posts cater to windows, mac, and linux, in that order. Could you point me in the direction of were I can find cleaner instructions for linux. I’m good with my hands but I’m getting a little lost in regard to the code. I’ve got the polargraph controller up and running, processing is working, and the arduino ide is working. I’ve moved the files around as per the instructions on instructables, but all I get are errors when I try to upload to the arduino. Also, processing isnt seeing the polargraph controller in the sketchbook folder. Any suggestions? Sorry, I’m a n00b. Thanks for your time and I hope you have a great year.

    • Hello thanks! Though DRBO was Stuart’s work rather than mine. No need to apologise for being a noob – I fully intend to be a noob my whole life. Unfortunately you don’t really give any information about what’s going wrong (like symptoms), so it could be literally anything though. If you have got the controller working, then that’s good – it doesn’t matter if it shows up in the sketchbook folder if you can run it from somewhere else.

      If you’re having issues with the controller (and libraries) you could try using the precompiled binaries instead of running from source.

      I hope you are not following the links from this (two year old) article, and have instead come across the main “source code” page linked to at the top of every page on this site (http://www.polargraph.co.uk/source-code/).

      There are no further documents re running on linux, beyond what you can google for. The truth is, though I develop on linux at my day job, all polargraph development happens on a windows box, so I have never tried using either arduino or processing in any other environment.

      It is also worth having a search of the forum here, there are a couple of threads that have talked about linux issues (I think I remember that happening anyway). And of course, that is a better venue for discussing and troubleshooting!

Leave a Reply