   }
 }
 
+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);
+}
+

  if (adk.isReady()) {
      adk.read(&bytesRead, BUFFSIZE, buffer);
    if (bytesRead > 0) {
      jeepCommandInterpreter(buffer[0] - 48, buffer[1] - 48);
    }
  }
}

void jeepCommandInterpreter(uint8_t commandMovement, uint8_t commandSpeed) {
  int vPower = speedToPower(commandSpeed);
  Serial.print("Required power: ");Serial.println(vPower);

  switch(commandMovement) {


  if (bytesRead == 2) {
    // Send commands to internal controller
    jeepCommandInterpreter(extractMovement(), extractSpeed());
    resetBuffer();
  }
}
