 int motor3_RPMCount = 0;
 int motor3_State = 0;
 int motor3_Lookup[55];
-
-unsigned long time = 0;
-
-
-
+int motor3_MaxRPM = 0;
+
+// ----------
 
 typedef struct SpeedMappingEntity {
   int RPM;

int motorPin3_speed = 9;
int motorPin3_A = A5;

int globalSpeedInit = 255;
int reducedSpeed = globalSpeedInit * 0.09;

void setup()
{
    Serial.begin(9600);
    while (!Serial)
        ;
    Serial.println("Init");

    pinMode(motorPin1_1, OUTPUT);
    pinMode(motorPin1_2, OUTPUT);
    pinMode(motorPin1_speed, OUTPUT);
    pinMode(motorPin1_A, INPUT);

    pinMode(motorPin2_1, OUTPUT);
    pinMode(motorPin2_2, OUTPUT);
    pinMode(motorPin2_speed, OUTPUT);
    pinMode(motorPin2_A, INPUT);

    pinMode(motorPin3_1, OUTPUT);
    pinMode(motorPin3_2, OUTPUT);
    pinMode(motorPin3_speed, OUTPUT);
    pinMode(motorPin3_A, INPUT);

}


void SetMotor(int pinSpeed, int pin1, int pin2, int speed)
{
    analogWrite(pinSpeed, abs(speed));
    if (speed < 0)
    {
        analogWrite(pin1, 0);
        analogWrite(pin2, 255);
    }
    else
    {
        analogWrite(pin1, 255);
        analogWrite(pin2, 0);
    }

    if (speed == 0)
    {
        analogWrite(pin1, 0);
        analogWrite(pin2, 0);
    }
}

int motor1_RPMCount = 0;
int motor1_State = 0;

    }
}







void loop()
{
    time = millis();

    UpdateRPM();

    Calibration();


}



