I was trying to send a message to Arduino (to test if the Arduino received any message the motor will turn on), the following code works if I run on Terminal
echo 1 > /dev/ttyACM0
But I tried this in Java
Runtime.getRuntime().exec("echo 1 > /dev/ttyACM0");
Anyone knows how to execute in Arduino Serial port?