We are about to switch to a new forum software. Until then we have removed the registration on this forum.
i have other exported .exe program all written and exported on this computer , they all work. is there something missing in the directories where the .exe's are placed? there is a lib and source directories and the .exe file only. The current java is installed. I execute the .exe from the directory it is written in to automatically by exportation. Any idea why it doesn't run?
Answers
@jeffmarc
What libraries and external resources are you using? What OS?
You say:
So it seems the problem is something in your code, which we cannot see. Provide more details or even a MCVE.
Kf
What are supposed to be in the blank areas?
If they are images then they should be in a folder called
data
inside the sketch folder. Only resources e.g. image, sound files etc inside the data folder will be exported with the application.I import serial and opencv libraries
import gab.opencv.*; import processing.serial.*;
if i remove the code for the serial port and compile then exe gets to main screen waiting for input.
I simply read the serial.list() and then create 2 serial ports to talk to if they exist
usbio=0; rs232=0;
if(Serial.list().length==0) { fill(255,0,0); textSize(20); rect(imgstartcol,490,640,50); fill(0); text("NO USB SERIALS PORT DETECTED ",440,517); }
if(Serial.list().length>0) { fill(0,255,0); // clear USB PORT MSG area textSize(20); rect(imgstartcol,490,640,100); fill(0);
//printArray(Serial.list()); //println(Serial.list()[0]);
//println(Serial.list()[0].substring(0,3)); for(x=0;x<Serial.list().length;x++) { text("USB SERIALS PORT DETECTED "+Serial.list()[x],440,517+(x*20)); // display USB port msg until 1st test started if( (Serial.list()[x].substring(0,3)).equals("COM")) { if(x==0) {usbio=1;myPort0 = new Serial(this, Serial.list()[0], 9600);} // I/O seen if(x==1) {rs232=1;myPort1 = new Serial(this, Serial.list()[1],9600,'N',7,1);} // chk later to output value to rs232 mill host computer } }
Again it all functions properly if i just run it in processing editor with run arrow
but the compiled version hangs at serial code above , never gets past it, i comment it out and it runs
Please format your code. Edit your post (gear on top right side of any of your posts), select your code and hit ctrl+o. Leave an empty line above and below your block of code. Details here: https://forum.processing.org/two/discussion/15473/readme-how-to-format-code-and-text
Kf
got this all running, but still have some quirks from running pde to exe.
com 3 is recognized in Serial .list opens and works , controle lamp and motor
exit pde. run again and i get error com 3 busy!? the sketch uses myport0.stop() after each open command. so the prot is closed in the program after every use.
if i exit the program clilcking on the X shouldn't the port be free?
quirk 2
the 32 bit exe runs fine it is a 64 bit win 10 home computer
the 64v bit runs , but where it is supposed to react to enter keypress , it doesn't do anything. the program is still running but is not seein keypress i can skip that function and continue to click buttons and the program runs fine. so its not hung up.
32 bit sees enter keypress 64 doesn't programs compiled from same sketch
Help!
thanks
ok, it appears as if when the exe is opened windows does not recognize it as the active window. if i click on any part of the window and then hit enter it works every time. So windows doesn't know its the active window when it starts . Is that a bug or am i doing something wrong in setup? I use the same setup as far as frame commands as in other programs.
My experience is that you need to click on the sketch window in order to register key actions. Not sure if it is possible to set the focus on the Windows right when it is launched. Maybe somebody else has other experiences or have a way to address this feature?
For the serial connection... I can't say much. I could suggest checking other postings related to arduino and run their provided code. If you post your code, both Processing and your ino code, there is a better chance to get more detailed feedback although it is better to post an MCVE. Most people won't be able to run your code but they could check your layout. You can also try checking the arduino forum if you haven't done so.
Kf