I am learning processing software here is the code for moving object..
i want to know how to make a file for opening it like flash file/gif images while saving/exporting it it is not doing as i want the processing software window open.
Processing If the OP would have a look there's examples to use processing with the com port.
And it's user base is big. But what do I know lol. But Bills right the OP has too many irons in the fire.
I was testing serial communication in processing using PIC16f877 can we use pic with processing? because nothing was happening in screen as per code changing value from UART the color will changes..
Code:
import processing.serial.*;
Serial port;
float brightness = 0;
void setup()
{
size(1200, 600); //Set size of the window
port = new Serial(this, "COM6", 9600); //change "COM11" to the usb port, you are using
port.bufferUntil('\n'); //wait for a value to appear in the Serial monitor
}
void draw()
{
background(0, 0, brightness);
}
void serialEvent (Serial port)
{
brightness = float(port.readStringUntil('\n'));
}
Display 0 does not exist, using the default display instead.
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
You have to set this to match the comport your using and make sure you load the right drivers
Code:
port = new Serial(this, "COM6", 9600)
Try google LOL
the rxtx communication jar file in the arduino and the serial communication jar in the arduino is slightly different than that of processing 1.5.1
you need to go into the arduino source package and copy that rxtx jar file and the native library for it based on your system platform into the processing built in serial library
I'm on a mac so for me its basically this:
right click show package contents on arduino then Contents > resources > java > rxtxcomm.jar and librxtxSerial.jnilib, copy those files into Processing > contents > resources > java > modes > java > libraries > serial then paste the rxtxcomm.jar in to that folder and then the librxtxSerial.jnilib into the macosx folder.
I recommend moving the files in there to other directories on your computer first and once you drop them in the Processing serial library, quit and restart to test it.
These file paths will be different if you are not on a mac but basically you need to replace the rxtxcomm.jar in processing and its native interface with the ones in arduino and you will be set regardless of your platform
I have downloaded the file RXTXcomm.jar in this folder it contain..gnu folder and META-INF i have copied it to Navigate to the Processing folder>modes>java>libraries>serial>library
but the error remain there why?????
I am suing processing 1.5 with XP 32bit and i want to do serial comm of uC using PIC16F877 with processing and tested that pic uC code in serial terminal window it is transferring 0xff and 0x02 with delay in between to see the color diff on processing window there is no error in both code but then also it is not changing window color why??
1. import processing.serial.*;
2. Serial port; float brightness = 00;
3. void setup()
4. {
5. size(1200, 600); //Set size of the window
6. port = new Serial(this, "COM11", 9600); //change "COM11" to the usb port, you are using
7. port.bufferUntil('\n'); //wait for a value to appear in the Serial monitor
8. }
9. void draw()
10. { background(0, 0, brightness);
11. }
12. void serialEvent (Serial port)
13. {
14. brightness = float(port.readStringUntil('\n'));
15. }