           if (tmp_str[i] == 'I' || tmp_str[i] == 'i'){// infrared
             int sensor_index;
             sscanf(tmp_str + i + 1, "%d", &sensor_index);
-            int sensor_value = infrared_sensors_control->get_distance(sensor_index);
+            int sensor_value = infrared_sensors_controller.get_distance(sensor_index);
             sprintf(serial_out, "I%d %d#", sensor_index, sensor_value);
             i += 2;
           }

#include "infrared_sensors_controller.h"
//#include "MemoryFree.h"

//byte potentiometers_pins[4] = {0, 1, 2, 3};
//t_limit_pair potentiometer_limits[4] = {{500, 1000, 500}, {500, 1023, 500}, {200, 600, 400}, {300, 600, 500}};

byte infrared_pins[2] = {52, 53};

t_motors_controller motors_controller;
t_potentiometers_controller potentiometers_controller;
t_ultrasonic_sensors_controller ultrasonic_sensors_controller;
t_infrared_sensors_controller *infrared_sensors_control;

char is_command_running;


void setup() 
{
  first_start = 0;
  strcpy(firmware_version, "2016.02.01.1");
  
  //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;

