       return "SHOOT";
   }
 }
+
+void move_forward(unsigned int duration)
+{
+  //forward @ full speed A
+  digitalWrite(12, HIGH); //Establishes forward direction of Channel A
+  digitalWrite(9, LOW);   //Disengage the Brake for Channel A
+  analogWrite(3, 255);   //Spins the motor on Channel A at full speed
+  
+    //forward @ full speed B
+  digitalWrite(13, LOW); //Establishes forward direction of Channel B
+  digitalWrite(8, LOW);   //Disengage the Brake for Channel B
+  analogWrite(11, 255);   //Spins the motor on Channel B at full speed
+  
+  delay(duration);
+  stop();
+}
+
+void rotate_right(unsigned int duration)
+{
+  //forward @ full speed B
+  digitalWrite(13, LOW); //Establishes forward direction of Channel B
+  digitalWrite(8, LOW);   //Disengage the Brake for Channel B
+  analogWrite(11, 255);   //Spins the motor on Channel B at full speed
+  
+  delay(duration);
+  stop();
+}
+
+void rotate_left(unsigned int duration)
+{
+  digitalWrite(12, HIGH); //Establishes forward direction of Channel A
+  digitalWrite(9, LOW);   //Disengage the Brake for Channel A
+  analogWrite(3, 255);   //Spins the motor on Channel A at full speed
+  delay(duration);
+  stop();
+}
+
+void stop()
+{
+  digitalWrite(9, HIGH);   //Disengage the Brake for Channel A
+  digitalWrite(8, HIGH);   //Disengage the Brake for Channel B
+}

int state = INIT_STATE;
void loop()
{
  Display.touch_Set(TOUCH_ENABLE) ;
  Display.touch_Set(TOUCH_REGIONDEFAULT) ;
  drawInitialScreen();

    switch(commands[i])
    {
      case MOVE:
            HWLOGGING.println("move forward");
            move_forward(duration[i]);          

          break;
      case ROTATE_LEFT:
            HWLOGGING.println("rotate left");
            rotate_left(duration[i]);          
          break;
      case ROTATE_RIGHT:
            HWLOGGING.println("rotate right");      
            rotate_right(duration[i]);          
          break;          
      case SHOOT:
          break;
    }
