Hello everyone, I allready tried to send data from processing to arduino. The problem is that not all numbers arrive at arduino.
I see this Serial Monitor
2234
42
42
242
2242
4
2
4
instead of every line repeating 234
My arduino code
byte recieve;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if(Serial.available() > 0 )
{
recieve=Serial.read();
Serial.println(recieve);
}
}
my processing code
import processing.serial.*;
Serial myPort;
int send=234,;
void setup()
{
String arduinoPort = Serial.list()[0];
myPort = new Serial(this, arduinoPort, 9600);
myPort.write(2);
}
void draw()
{
myPort.write(send);
print("sent ");
println(send);
delay(2000);
}
Thanks
P.S. I know that I can only send from Processing to Arduino 8byte on data. 234<255.
I have some doubts about it. It seems to me that arduino dont get the data because of some reasons.
The one is maybe the cable issue, contact or the length of it ??? I allready tried with another one, doesnt work
another ideas?
2nd p.s. the strange thing is if i send data from arduino to processing it works perfectly