 //--------------------------------------------------------------------------------------------
 void setup() 
 {
-  motors_control.reset_pins();
-
+  strcpy(firmware_version, "2016.01.22.2");
+  
+  motors_controller.set_num_motors(2);
+  ultrasonic_sensors_controller.set_num_sensors(1);
+  
+  //potentiometers_control = new t_potentiometers_controller(4, potentiometers_pins, potentiometer_limits);
+  infrared_sensors_control = new t_infrared_sensors_controller (2, infrared_pins);
+  
   current_buffer[0] = 0;
 
   Serial.begin(115200); //Open Serial connection

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

            if (tmp_str[i + 1] == 'M' || tmp_str[i + 1] == 'm'){ // get motor speed and acceleration
              int motor_index, motor_speed, motor_acceleration;
              sscanf(tmp_str + i + 2, "%d", &motor_index);
              motors_controller.get_motor_speed_and_acceleration(motor_index, &motor_speed, &motor_acceleration);
              sprintf(serial_out, "MP%d %d %d#", motor_index, motor_speed, motor_acceleration);
              i += 4;
            }
            else
              if (tmp_str[i + 1] == 'P' || tmp_str[i + 1] == 'p'){ // get potentiometer min max home
                int pot_index, pot_min, pot_max, pot_home;
                byte pot_pin;
                sscanf(tmp_str + i + 2, "%d", &pot_index);
                potentiometers_control.get_params(pot_index, &pot_pin, &pot_min, &pot_max, &pot_home);
                sprintf(serial_out, "PP%d %d %d %d %d#", pot_index, (int)pot_pin, pot_min, pot_max, pot_home);
                i += 4;
              }
            else
              if (tmp_str[i + 1] == 'U' || tmp_str[i + 1] == 'u'){ // get potentiometer min max home
                int ultrasound_index;
                byte trig_pin, echo_pin;
                sscanf(tmp_str + i + 2, "%d", &ultrasound_index);
                ultrasonic_sensors_controller.get_sensor_pins(ultrasound_index, &trig_pin, &echo_pin);
                sprintf(serial_out, "UP%d %d %d#", ultrasound_index, trig_pin, echo_pin);
                i += 4;
              }
        }
