The module I decided to try out was the stepper motor. The given tutorial was great and easy to use. Since this was a n output device I wanted to try using my keyboard as input and proceeded to research serial communication. I found a very useful tutorial here which helped me understand ASCII and how to use it with the arduino.

#define DIR_PIN 2
#define STEP_PIN 3

void setup() { 
  
  //create Serial Object
  Serial.begin(9600);
  
  pinMode(DIR_PIN, OUTPUT); 
  pinMode(STEP_PIN, OUTPUT); 
} 

void loop(){ 

 
  //Have the arduino wait to receive input
  while (Serial.available() == 0);

  //Read the input
  int val = Serial.read() - '0';
  

  

 if (val == 4) {
    Serial.println("anitclockwise"); 
    rotateDeg(-180, .5); 
    delay(1000);
  }
  if (val == 6) {
    Serial.println("anitclockwise"); 
    rotateDeg(120, .5); 
    delay(1000);
  }
   if (val == 8) {
    rotateDeg(-180, .1); 
    delay(1000);
  }
 else if (val == 2) {
    Serial.println("slow");  
    rotateDeg(90, .1); 
    delay(1000);
  }
  else {
   Serial.println("invalid");
  }

}

 void rotateDeg(float deg, float speed){ 
  //rotate a specific number of degrees (negitive for reverse movement)
  //speed is any number from .01 -> 1 with 1 being fastest - Slower is stronger
  int dir = (deg > 0)? HIGH:LOW;
  digitalWrite(DIR_PIN,dir); 

  int steps = abs(deg)*(1/0.225);
  float usDelay = (1/speed) * 70;

  for(int i=0; i < steps; i++){ 
    digitalWrite(STEP_PIN, HIGH); 
    delayMicroseconds(usDelay); 

    digitalWrite(STEP_PIN, LOW); 
    delayMicroseconds(usDelay); 
  } 
}