Both of them are interesting and the second one allow many kinds of graph so if you're interested in this subject I suggest to take a look at it.
Anyway they do not allow to do exactly what I need.
Do you know if there is something already done to do what I need? If possible I would like also to have a GDI to select ranges of data from timestamp (for example last week, last month ecc..) and to zoom on the graph.
Hello. I have done a program that read from a serial port (importing processing.serial.*). If I export the application in an "exe" file everything work, but if I ran the program from the ide the COM comunication seeems not to work. Do you have any idea about?
May be I am using two different version of RXTX library? In the processing ide I am using the 2.1-7, the ".exe" use the one putted in the folder by the compiler process. How can I discover wich version it is? (the dll file is not human readable).
Hi, I have found many guide about calling processing function from eclipse but nothing about call java files (*.java) from the pde files.
Is it necessary to put the java files into the library folder? Do I have to make class or jar files or can I direcltly use the .java? How to include them?
For example if I have a main pde file and from the "new tab" I add a Include.java file with these codes it does not work
mainPde:
public class User extends Include { System.out.println(Include.MyLongString); }
void setup() { size(600, 600); background(255); }
void draw() { }
Include.java
public class Include { public static String MyLongString= "abcdef"; }
Hello, I can't understand well how sqlite time and dates work in processing. I have a db with a column timestamp saved as integer. If I query the db from a dbms with this:
SELECT datetime(data,'localtime') as italyTime FROM myTable
i obtain not the gmt time but the one according to my country (Italy in this case).
Running the same code into processing (using de.bezier.data.sql.* library), I always obtain the gmt time. Is it possible processing can't access my OS clock and so it can't know where I am?
Thanks
hello, I have a problem communicating with my arduino leonardo.
This is the processing code:
import processing.serial.*;
Serial myPort; // Create object from Serial class int val; // Data received from the serial port
void setup() { size(200, 200); // I know that the first port in the serial list on my mac // is always my FTDI adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. String portName = Serial.list()[1]; println(Serial.list()); myPort = new Serial(this, portName, 9600); }
void draw() { if ( myPort.available() > 0) { // If data is available, val = myPort.read(); // read it and store it in val print((char) val); }
}
and this is the arduino one:
void setup() {
Serial.begin(9600); // Start serial communication at 9600 bps while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } }
void loop() { delay(1000); Serial.print("hoila "); // send to Processing delay(1000); Serial.print("hoibo "); // send to Processing }
I receive all char if I use another arduino (not leonardo), or anoter serial terminal with leonardo, but with arduino leo and processing connected on the serial port nothing is read.
Do you have any idea?
thanks in advance
Hi, I am working with the serial library and I can't find how to manage two cases:
1) I try to access a COM that is already busy
2) I have already opened a COM and I physically detach the usb port
In both cases I must use exception so that my code understand that it can't speak with that COM port.
I have googoled a lot but I can't find how to cach those exceptions. Particullary:
1) I know there is a "PortInUseException" in java but how to call it from processing?
2) I can do something like this:
try{
arduinoPort.write("message");
}
or
try{
arduinoPort.readStringUntil('delimiter');
}
but after?
With catch (RuntimeException e) or catch (Exception e) or without try and catch java platform crashes...
Hi, I need to make an arduino to speak with processing without manually setting the com port. I can't use expression like this one:
arduinoPort = new Serial(this, Serial.list()[13], 9600) ;
because I can't know on wich port arduino is attached to, and people that uses my program may be do not know what port they must set.
I thought to scan all the port to find the one with the arduino attached to, but when I try to speak with a busy port an exception arises. Do you know if there is a way to know the device name attached to the COM from processing?
thanks
Hi, I see that "Serial.list()" returns all the port: the free ones and also the ports with something already connected to. If I want to test all the ports to discover on wich a specific device is connected my program crashes at "new Serial(this, Serial.list()[X], 9600)" where X is a port that is busy.
The error is this:
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467)
at processing.serial.Serial.<init>(Unknown Source)
at processing.serial.Serial.<init>(Unknown Source)
at rilevaSeriale.setup(rilevaSeriale.java:41)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.<init>()
at processing.serial.Serial.errorMessage(Unknown Source)
at processing.serial.Serial.<init>(Unknown Source)
at processing.serial.Serial.<init>(Unknown Source)
at rilevaSeriale.setup(rilevaSeriale.java:41)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Do you have any suggestion on how to exlude ports with something already connected to?
Is it possible that the constructor of Serial returns something (not described in the documentation)?