         if(data == "fast")
         {
             servoRotationAngel = servoRotationAngelFast;
-            averageScanAmount = averageScanAmountFast;
             return;
         }
 
         if(data == "medium")
         {
             servoRotationAngel = servoRotationAngelMedium;
-            averageScanAmount = averageScanAmountMedium;
             return;
         }
 
         if(data == "detail")
         {
             servoRotationAngel = servoRotationAngelDetailed;
-            averageScanAmount = averageScanAmountDetailed;
             return;
         }
     }
 }
 
-void SendData(name, position, distance)
+void SendData(String sensorName, int pos, int distance)
 {
     Serial.print("Laser");
     Serial.print("|");
-    Serial.print(name);
+    Serial.print(sensorName);
     Serial.print("|");
-    Serial.print(position);
+    Serial.print(pos);
     Serial.print("|");
     Serial.println(distance);
 }

#include "VL53L0X.h"

// Laser
#define XSHUT_pin4 8
#define XSHUT_pin3 7
#define XSHUT_pin2 6
#define XSHUT_pin1 5

//ADDRESS_DEFAULT 0b0101001 or 41
//#define Sensor1_newAddress 41 not required address change
#define Sensor2_newAddress 42
#define Sensor3_newAddress 43
#define Sensor4_newAddress 44

VL53L0X Sensor1;
VL53L0X Sensor2;
VL53L0X Sensor3;
VL53L0X Sensor4;


// Servo


long GetRange(int id)
{
    if(id == 1 || id == 2)
    {
        int dist = 0;
      
        if(id == 1)
        {
            dist = Sensor1.readRangeContinuousMillimeters();
        }
    
        if(id == 2)
        {
            dist = Sensor2.readRangeContinuousMillimeters();
        }
        
        if(dist < minDistance) { dist = maxDistance; }
        if(dist > maxDistance) { dist = maxDistance; }

        return dist;
    }

    return 0;
