 void Roll_Control(sensors_event_t event) {
 
   if(!startRollFlag) { //For roll initialization, cant fins in the direction of current roll
-    digitalWrite(homePin, LOW);
+    digitalWrite(inputA, LOW);
     servoHomeFlag = false;
     startRollFlag = true;
     if(event.gyro.z > 0) {
-      digitalWrite(statePin, HIGH);
+      digitalWrite(inputB, HIGH);
       finState = true;
     }
     else {
-      digitalWrite(statePin, LOW); 
+      digitalWrite(inputB, LOW); 
       finState = false;
     }
   }
-  else if(!endRollFlag) { //Wait until two revolutions have ben completed to begin counter-roll
+  else if(!endRollFlag) { //Wait until two revolutions have been completed to begin counter-roll
     
     if(rotationCounter > 2) {
       finState = !finState;
-      digitalWrite(statePin, finState);
+      digitalWrite(inputB, finState);
       endRollFlag = true;
     }
   }
   else { //At this point, continue to make adjustments to prevent roll
     if(abs(event.gyro.z) < MIN_ROLL_THRESHOLD)
     {
-      digitalWrite(homePin, HIGH);
+      digitalWrite(inputA, HIGH);
       servoHomeFlag = true;
     }
     else if(event.gyro.z > 0)
       {
-      digitalWrite(homePin, LOW);
+      digitalWrite(inputA, LOW);
       servoHomeFlag = false;
-      digitalWrite(statePin, LOW);
+      digitalWrite(inputB, LOW);
       finState = false;
       }
     else if(event.gyro.z < 0)
       {
-      digitalWrite(homePin, LOW);
+      digitalWrite(inputA, LOW);
       servoHomeFlag = false;
-      digitalWrite(statePin, HIGH);
+      digitalWrite(inputB, HIGH);
       finState = true;
       }
   }

  digitalWrite(RFM95_RST, HIGH);
  
  pinMode(controlPin, OUTPUT);
  pinMode(homePin, OUTPUT);
  pinMode(statePin, OUTPUT);

  accel.begin();
  bmp.begin();

/*
 * Notre Dame Rocket Team Roll Control Payload Master Code V. 0.91
 * Aidan McDonald, 2/1/17
 * Kyle Miller, 2/2/17
 * 
 * Most recent changes:
 * Moved the GPS enable code again, to <600 ft post-apogee
 * Incorporated receiving data from the ground station
    * Added two master flags to control sensor enabling and fin control disabling
 * Revised the data transmission section to send altitude data when gps/gyro data isn't being sent
 * Changed Pin Variables to match what the inputs to the servo will be 
 * 
 * To-dones:
  * Basic switch-case structure
