Hello everybody,
i want to reach that values represent themselves via processing from the counter. My problem is that my Arduino output is X20, Y20 (step) and I want the output to be displayed on two surfaces. One for X and a second for Y. How should I achieve the same in processing as in my Arduino?
Regards and thanks
i want to reach that values represent themselves via processing from the counter. My problem is that my Arduino output is X20, Y20 (step) and I want the output to be displayed on two surfaces. One for X and a second for Y. How should I achieve the same in processing as in my Arduino?
Code
char Serial_in;
int X_Serial_value;
int Y_Serial_value;
……………………………………
// If there is "X" or "x" in Serial, parseInt() will extract the value for X_serial_value from Serial.
while (Serial.available())
{ Serial_in = Serial.read();
if (( Serial_in == 'X' ) ^ (Serial_in == 'x')) { X_Serial_value = Serial.parseInt(); }
else
if (( Serial_in == 'Y' ) ^ (Serial_in == 'y')) { Y_Serial_value = Serial.parseInt(); }Regards and thanks
