Error message about serial library version
in
Core Library Questions
•
1 years ago
I am trying to send a file through a serial port. ( to an Arduino ) It work ( sort of ) <-- RX light up..
But I received this message. Even there is nothing connecting to the serial port. COM1
Here the "error" message.
WARNING : RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
What is it ? And what I can do to correct it ? Program work fine. Except that error message.
Here my code : I modify the example code of loadBytes()
- import processing.serial.*;
- Serial myport;
- void setup()
- {
- println(Serial.list());
myport = new Serial(this,Serial.list()[3], 9600); // My Arduino is COM7 - // change the line --> myport = new Serial(this,Serial.list()[0],9600); // for COM1
- // open a file and read its binary data
byte b[] = loadBytes("curconv.rms");
int sz=b.length;
println("The size of the file is : "+sz+"\n");
// print each value, from 0 to 255
for (int i = 0; i < b.length; i++)
{
// every tenth number, start a new line
if ((i % 16) == 0) {
println();
}
// bytes are from -128 to 127, this converts to 0 to 255
int a = b[i] & 0xff;
print(hex(a,2) + " ");
myport.write(a);
}
// print a blank line at the end
println(); - }
2