               if (tmp_str[j] == 'P' || tmp_str[j] == 'p'){
                 int sensor_index;
                 sscanf(tmp_str + j + 1, "%d", &sensor_index);
-                motors_controller.add_sensor(motor_index, POTENTIOMETER, sensor_index);
+                stepper_motors_controller.add_sensor(motor_index, POTENTIOMETER, sensor_index);
                 i += 2;
               }
               j++;

        if (tmp_str[i] == 'D' || tmp_str[i] == 'd'){// disables motor
          int motor_index;
          sscanf(tmp_str + i + 1, "%d", &motor_index);
          motors_controller.disable_motor(motor_index);
          sprintf(serial_out, "D%d#", motor_index);
          i += 2;
        }

        int motor_index, num_steps;
        int num_read = sscanf(tmp_str + i + 1, "%d%d", &motor_index, &num_steps);
        if (num_read == 2){
          stepper_motors_controller.move_motor(motor_index, num_steps);
          is_command_running = 1;
          i += 4;
        }
