Need help converting String to int...

I'd suggest replacing ...

if (index > 4 || inByte == 10 || inByte == 13)

... with ...

if ( (index > 4) || (inByte == '\n') || (inByte == '\r') )

And 'getServoNum' can be shortened to ...

int getServoNum()
{
    char num[3] = { 0 };
    
    return atoi(strncpy(num, inData, sizeof(num) - 1));
}