Processing code
void setup()
{
size(200, 200);
myPort = new Serial(this, "COM6", 57600);
}
void draw() {
fill(value,0,255);
rect(25, 25, 50, 50);
}
void mouseClicked() {
if (value == 0) {
value = 255;
for(int i=0;i<=11;i++){
myPort.write(collect[i]);
}
} else {
value = 0;
}
}
Arduino code
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
void setup(){
Serial.begin(57600);
mySerial.begin(57600);
}
void loop(){
while (Serial.available()){
uint8_t byts=Serial.read();
mySerial.write(byts);
}
}
I got error like this iyyyy iyyyy iyyyy
even if i send single byte like this 0xEF i got 'i;'
I also checked different baud rates no improvement
For viewing purpose I am using software serial and this 2,3 pins are connected with my CP2102 USB to TTL with different port(COM3).
Arduino nano connected with COM6 for upload the code. after uploading I run the processing sketch. because this is using COM6 port.
Please find the attachment.