 #include <stdio.h>
 #include <adk.h>
 #include "DualMC33926MotorShield.h"
-#define BUFFSIZE   128
+#define BUFFSIZE   255
 #define MAX_POWER  400
+#define DELAY 50
+
 
 // Start Accessory Descriptor. It's how Arduino identifies itself in Android.
 char accessoryName[] = "UDOO Mobile Tank";

  tank.setM2Speed(0);
}

void readingFromADK() {
  Usb.Task();
  // Starting listening when ADK is available
  if (adk.isReady()) {
    adk.read(&bytesRead, BUFFSIZE, buffer);
    if (bytesRead > 0) {
      for (int i = 0; i < bytesRead; i++) {
        if (buffer[i] >= 48 && buffer[i] <= 47)
          Serial.print(buffer[i] - 48);
        else
          Serial.print((char)buffer[i]);
        Serial.print("-");
        //eepCommandInterpreter(extractMovement(), extractSpeed());
        //eepCommandInterpreter(extractMovement(), extractSpeed());
      }	Serial.print("RECEIVED FROM USB: ");
      Serial.println(*(uint32_t*)buffer);
    }
  } sendingToADK();
}

void sendingToADK() {
  int time = millis();

USBHost Usb;
ADK adk(&Usb, manufacturer, model, accessoryName, versionNumber, url, serialNumber);
// End ADK configuration
bool DEBUG_MODE = true;
int randomint;
int last_send = 0;
uint8_t inBuffer[BUFFSIZE];
uint8_t outBuffer[BUFFSIZE];
char inStringBuffer[BUFFSIZE];
char outStringBuffer[BUFFSIZE];
uint32_t bytesRead = 0;

char charBuf[255];
char bufNew[255];
DualMC33926MotorShield tank;

void setup() {
