           isSubmitButtonPressed = false;
           getMatrixInput();
           sendMessage();
+          sendTime = millis();
           updateReadArduinoStatus(STATE_ACK);
         }
-      break;
+        break;
     case STATE_ACK: // Waiting for acknowledge
-//      if(isMessageReceived) {
-        // CUSTOMPROTOCOL::ISSUCCESFULRECEIVED();
-//        if(isMessageSuccessful) {
-//          updateReadArduinoStatus(STATE_UID);
-//        } else {
-          // light error led
-          trellisFlashBoard(2);
+      if ((millis() - sendTime) > WAIT_TIME) {
+        trellisFlashBoard(5);
+        updateReadArduinoStatus(STATE_UID);
+        digitalWrite(LED_ERR, HIGH);
+      }
+
+      // waiting for response
+      if (Serial.available()) {
+        // reading incoming bytes
+        byte nextByte = Serial.read();
+        if (CustomProtocol::isSuccessfulAcknowledgement(nextByte)) {
+          trellisFlashBoard(1);
           updateReadArduinoStatus(STATE_UID);
-//        }
-//      }
+        }
+      }
       break;
     default:
       break;

#define STATE_ACK 2

#define DEBUG_MODE false

Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis =  Adafruit_TrellisSet(&matrix0);

uint8_t authenticatedUser;

uint8_t userShift;
unsigned long sendTime;

/*
 *  Code to control Trellis LEDs
