@GoToLoop I have tried and tried and even copied the code on the links you gave as though it was a template, but I have gotten nothing
I did, however, watch a video about multiple serial values and acting on it. After watching it I got this:
import processing.serial.*;
Serial port;
int index = 0;
int[] input_arr = new int[2];
int px, py;
int x, y;
void setup() {
background(0);
size(500, 500);
port = new Serial(this, "COM12", 115200);
stroke(255);
}
void draw() {
}
void serialEvent() {
while (port.available() > 0) {
String raw = port.readStringUntil('\n');
input_arr[index] = int(raw);
index++;
if (index > 1) {
x = px + input_arr[0];
y = py + input_arr[1];
port.clear();
println(input_arr[0]); //debug; this doesnt print anything
px = x;
py = y;
}
}
line(x, y, px, py);
port.bufferUntil('\n');
}
I might start a new thread about this specific oneā¦