Hello!
I have one important question. If I want to program a robot that, when I dont press any button of the controller, stops, how do I do it?
How will the robot know that you haven't pressed any button on the controller?
What controller are you using? What is the means of communication between the robot and the controller/Arduino?
You have given very little information.
Are you talking about wireless control of a robot?
If so the usual thing is to send one message when a button is pressed and a different message when the button is released. Perhaps send 'A' when it pressed and 'a' when it is released.
...R