Trigger the video player when processing read a defined number

Note two things I put in comments. Firstly, make sure to initialize the val to a number bigger than your threshold (100). Secondly, decide what to do if the string you read isn’t a valid number - eg. print out the exception (this is the reason that I suggested Integer.parseInt() over the built-in parseInt(). Although the other thing you could do is print what you receive -

String s = myPort.readStringUntil('\n');
println(s);
val = Integer.parseInt(s);

EDIT - by the way, just noticed your Arduino sketch isn’t just sending numbers! You need to remove the Ping and cm if you want this to work (or parse them out of the string on the receiving end).