Added emergency stop function to the arduino