           i += 4;
         }
         else if (tmp_str[i + 1] == 'P' || tmp_str[i + 1] == 'p') { // get potentiometer min max home dir
-          int pot_index, pot_min, pot_max, pot_home, pot_dir;
+          byte pot_index;
+          int pot_min, pot_max, pot_home;
+          unsigned char pot_dir;
           byte pot_pin;
           sscanf(tmp_str + i + 2, "%d", &pot_index);
           potentiometers_controller.get_params(pot_index, &pot_pin, &pot_min, &pot_max, &pot_home, &pot_dir);

void setup()
{
  first_start = 0;
  strcpy(firmware_version, "2016.07.15.0");

  current_buffer[0] = 0;


            int sensor_index;
            sscanf(tmp_str + j + 1, "%d", &sensor_index);
            if (motor_type == 'S' || motor_type == 's') // attach to stepper motors controller
              stepper_motors_controller.add_sensor(motor_index, INFRARED_ANALOG, sensor_index);
            else if (motor_type == 'D' || motor_type == 'd') // attach to DC motors controller
              dc_motors_controller_TB6612FNG.add_sensor(motor_index, INFRARED_ANALOG, sensor_index);
            j += 2;
            k++;
          }
