Add command and segment selection in communication between Raspi and Arduino