   }
 } // end loop()
 
-void readWristInterrupt() {
-  // interrupt occurs on CHANGE - need to determine if now high (start of pulse) or low (end of pulse
-  if(digitalRead(WristInterrupt) == HIGH){
+/********************
+----- FUNCTIONS -----
+********************/
+
+void readWristInterruptPin() {
+  // interrupt occurs on CHANGE - need to determine if now high 
+  // (start of pulse) or low (end of pulse
+  if(digitalRead(WristInterruptPin) == HIGH){
     wristTimer = micros();  // get time stamp for initiation of pulse
   }
   else{   
     // pin must now be low - end of pulse; calculate pulse width
     wristPW = micros() - wristTimer;
-    flag = true;
+    wristFlag = true;
   }
-} // end readWristInterrupt()
+} // end readWristInterruptPin()
 
-void readClawInterrupt() {
-  // interrupt occurs on CHANGE - need to determine if now high (start of pulse) or low (end of pulse
-  if(digitalRead(ClawInterrupt) == HIGH){
-    clawTimer = micros();  // get time stamp for initiation of pulse
+void readClawInterruptPin()        // works just like wrist interrupt
+  if(digitalRead(ClawInterruptPin) == HIGH){
+    clawTimer = micros(); 
   }
-  else{   
-    // pin must now be low - end of pulse; calculate pulse width
+  else{
     clawPW = micros() - clawTimer;
-    flag = true;
+    clawFlag = true;
   }
-} // end readClawInterrupt()
+} // end readClawInterruptPin()

/*
dfrdb
DFRobot Romeo Drive Bot
Robot for MakerFaire Kansas City Arch Reactor booth

Read RC signal pulse width by using interrupt then control servos of
SparkFun robot arm (https://www.sparkfun.com/products/11524 and  https://www.sparkfun.com/products/11674 )


DFRobot Romeo v2 controller board 
http://www.dfrobot.com/wiki/index.php/Romeo_V2-All_in_one_Controller_(R3)_(SKU:DFR0225)

Board has pin config like Leonardo - plan to take advantage of fact that Leonardo has 4 hardware
interrupts for my 4 controller signals; see http://www.arduino.cc/en/Reference/AttachInterrupt 

                   
Helpful resources:

} // end setup()

void loop() {
  // use flag to see if there is actually a new signal
  if (wristFlag){
    noInterrupts(); // pause interrupts so pw signals are read faithfully 
                    // and not changed part way during assignment
    wristPulse = wristPW;
    wristFlag = false;
    interrupts();   // there is a safer way to do this by saving and restoring 
                    // settings register, but since I'm not using extensive 
                    // libraries should be OK
    
    wrist.writeMicroseconds(wristPulse);
  }
  if (clawFlag){ 
    noInterrupts(); 
    clawPulse = clawPW;
    clawFlag = false;
    interrupts(); 
    // for claw want to open/close base on stick, but then hold position; 
    // so increment/decrement depending on position
    // and then keep that value if joystick centered
    if (clawPulse < ClawRDZ){
      clawAngle -= 1; 
    }
    else if (clawPulse > ClawLDZ){
      clawAngle +=1;
    }
    clawAngle = constrain(clawAngle, minClawAngle, maxClawAngle);
