Serial communication speed issue? how to delay buffer

Nevermind i realised i had char instead of unsigned char

millis returns an unsigned long..
don't try to read all the bytes at once, keep track of how many and trigger when you have received what you expect..

try this untested sorry..

unsigned char Buffer[9];
unsigned long CurrentTime = millis();
unsigned long LastTime = 0;
const int DelayTime = 1000;
byte recvCount = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial1.begin(115200);

}

void loop() {
  // put your main code here, to run repeatedly:
  Clock();
  RecvData();
}

void Clock() {
  CurrentTime = millis();
  if (CurrentTime - DelayTime > LastTime) {
    LastTime = CurrentTime;
    Serial.print("Clock Data: ");
    SendData();
  }
}

void RecvData() {
  if (Serial1.available() )
  {
    unsigned char achar = Serial1.read();
    if (recvCount == 0 && achar != 0x5A) return;
    if (recvCount == 1 && achar != 0xA5) {
      recvCount = 0;
      return;
    }
    if (recvCount == 2 && achar != 0x06) {
      recvCount = 0;
      return;
    }
    if (recvCount == 3 && achar != 0x83) {
      recvCount = 0;
      return;
    }
    Buffer[recvCount] = achar;
    recvCount++;
    if (recvCount == 9) {
      //got all bytes..
      Serial.print("Button Press Data: ");
      SendData();
      recvCount = 0;
    }
  }
}

void SendData() {
  Serial.print("Current Time: ");
  Serial.print(CurrentTime);
  Serial.print("    Buffer: ");
  Serial.print(Buffer[0], HEX);
  Serial.print(", ");
  Serial.print(Buffer[1], HEX);
  Serial.print(", ");
  Serial.print(Buffer[2], HEX);
  Serial.print(", ");
  Serial.print(Buffer[3], HEX);
  Serial.print(", ");
  Serial.print(Buffer[4], HEX);
  Serial.print(", ");
  Serial.print(Buffer[5], HEX);
  Serial.print(", ");
  Serial.print(Buffer[6], HEX);
  Serial.print(", ");
  Serial.print(Buffer[7], HEX);
  Serial.print(", ");
  Serial.print(Buffer[8], HEX);
  Serial.println();
}

reads one byte at a time..
checks for proper header..

good luck.. ~q

That works perfectly , thankyou very much now to go through and learn what you did.

Much appreciated!