PID Front end v03, no longer supported? SOLVED

EDIT: SOLVED

Hi All,

I'm trying to get PID Front end v03 going and am not having any luck, it seems I have compatibility issues due to new versions.
I'm using ControlP5-2.2.5, Processing 3.0b6 and Arduino 1.6.2.

Can some who has Front end v03 running tell me what versions of Processing and ControlP5 they are running?

Further info on what I've done so far, I followed the instructions found here:

which consists of:
Download & install 32-bit version Processing.org
Start processing.org by executing the processing.exe and exiting again (this is necessary to make processing create the folders for the ControlP5 library)
Download ControlP5 and install it by unzipping it to the processing library folder (on windows this is ~/Documents/Own Documents/Processing/libraries
Download the PID Front-End using Processing.org and unzip it somewhere.
Open processing again, and open the Front-End Sketch in “PID_Frontend_v03/PID_Frontend_v03.pde”.
Use the sample in ArduinoSampleCode to update your arduino code. It basically needs to be able to receive and send the pid-variables via serial.
Connect your arduino and run your arduino code
Start the Front-End sketch in processing. You will get an output listing all the available COM-ports:

At this point Processing can't run PID_FrontEnd_v03, the first error is with 'size()', and that numbers, not variables must be used, I fixed that by replacing with:

//size(windowWidth , windowHeight);
fullScreen();

Trying to run after that I get an error on line 349:

if(AMLabel.valueLabel().getText()=="Manual")

where 'the function "valueLabel()" does not exist"

At this point I did some googling and found this from the creator of PID Front End:

it's been a long time since a wrote/checked that stuff. it's conceivable that you'll need to use an earlier version of processing (for certain you'll need to use the older version of the controlP5 library)

https://groups.google.com/forum/#!topic/diy-pid-control/zEbglIO7ut8

Any help is much appreciated.

Ok, So I found a solution:

Change valueLabel() to getValueLabel()

From here:

https://groups.google.com/forum/#!topic/diy-pid-control/eNmDY-5Hvh8

PID Front end will now run.

When I run it, my second monitor goes full screen black, and Processing shows ArrayIndexOutOfBoundsException: 1

If I run the debugger and advance a step I get this error:

Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 1
at PID_FrontEnd_v03_updated.setup(PID_FrontEnd_v03_updated.java:117)
at processing.core.PApplet.handleDraw(PApplet.java:2373)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1507)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)

(And the previously black monitor goes grey)

Any help is much appreciated, I'm way out of my depth!

Solved.

Even though my Arduino is on COM4, setting PID front end back to the default of COM3 fixes the problem.

Line 96 of PID_FrontEnd_v03:

  myPort = new Serial(this, Serial.list()[0], 9600);

Where:

[0 ] "COM3" (works for me)
[1] "COM4" (The port my Arduino is actually on, according to the the Arduino IDE )
[2] "COM5"
[3] "COM6"
[4] "COM11"

I hope this might help someone in the future!

I messed around with Processing and P5 a while until I found this forum here. :confused:

Change valueLabel() to getValueLabel()

Thanks for the fix. :slight_smile:

I am under Linux and replaced:

myPort = new Serial(this, Serial.list()[0], 9600);

with

myPort = new Serial(this, "/dev/ttyUSB0", 9600);

then I got the serial working.

Thanks a lot!! I was having the exact same issues, now the frontend GUI works perfectly.

Thank you! Worked for me in linux.