   if (adk.isReady()) {
       adk.read(&bytesRead, BUFFSIZE, buffer);
     if (bytesRead > 0) {
-      jeepCommandInterpreter(buffer[0] - 48, buffer[1] - 48);
+      jeepCommandInterpreter(extractMovement(), extractSpeed());
     }
   }
 }
 
 void jeepCommandInterpreter(uint8_t commandMovement, uint8_t commandSpeed) {
-  int vPower = speedToPower(commandSpeed);
+  int vPower = motorProtection(commandSpeed);
   Serial.print("Required power: ");Serial.println(vPower);
 
   switch(commandMovement) {


#define BUFFSIZE   128
#define MAX_POWER  400
#define MIN_POWER -400

// Command interpreter logic
const static boolean DEBUG = false;

  }
}

uint8_t extractMovement() {
  return buffer[0] - 48;
}

uint8_t extractSpeed() {
  uint8_t speedBuffer[3] = { 45, 45, 45 };

  int i = 0;
  while (buffer[i + 2] >= 48 && i < 3) {
    speedBuffer[i] = buffer[i + 2];
    i++;
  }

  return atoi((char*)speedBuffer);
}

