Setting Digital input to freedrive through java

Hello!

We have an integrator that was looking into doing the same thing.

Just for info for other people with similar problems:
One thing that gave us trouble was the character encoding that, it was not UTF, so it was not reading \n as we expected it.

Anyhow, for troubleshooting, a simple solution to test is to send it on the primary or secondary interface, this example with a popup instead of a input:

Locally on the robot:
printf 'def test(): \n freedrive_mode() \n popup("test") \n while(1): \n sync() \n end \nend \n' | nc -q 0 127.0.0.1 30002
-q 0 flag on nc is to close the connection straight after sending.

or remote from a terminal with telnet
echo -e 'def test(): \n freedrive_mode() \n popup("test", blocking=True) \n end_freedrive_mode() \nend \n' | telnet IP_ADRESS_OF_ROBOT 30002
-e flag on echo is the same output as printf and this is without the while loop, so the blocking will keep the programs from running further, til popup is closed…

Hope it helped someone!