               // This keeps anyhting from happeneing while we get set up
 
   TCNT2 = 0x00;     // Start counting at bottom. 
-  OCR2A = 0;      // Set TOP to 0. This effectively keeps us from counting becuase the counter just keeps reseting back to 0.
+  OCR2A = 0;      // Set TOP to 0. This effectively keeps us from counting because the counter just keeps reseting back to 0.
           // We break out of this by manually setting the TCNT higher than 0, in which case it will count all the way up to MAX and then overflow back to 0 and get locked up again.
   OSP_SET_WIDTH(cycles);    // This also makes new OCR values get loaded frm the buffer on every clock cycle. 
 
   TCCR2A = _BV(COM2B0) | _BV(COM2B1) | _BV(WGM20) | _BV(WGM21); // OC2B=Set on Match, clear on BOTTOM. Mode 7 Fast PWM.
   TCCR2B = _BV(WGM22)| _BV(CS20);         // Start counting now. WGM22=1 to select Fast PWM mode 7
 
-  DDRD |= _BV(3);     // Set pin to output (Note that OC2B = GPIO port PD3 = Arduino Digital Pin 3)
+  DDRD |= _BV(SERVO_PIN);     // Set pin to output (Note that OC2B = GPIO port PD3 = Arduino Digital Pin 3)
 }
 
 // Setup the one-shot pulse generator


// The one shot pulses are output on Digial pin 3



#define OSP_SET_WIDTH(cycles) (OCR2B = 0xff-(cycles-1))

// Setup the one-shot pulse generator and initialize with a pulse width that is (cycles) clock counts long


{
  // Step though 0-19 cycle long pulses for demo purposes 

  for (pos = mid-100; pos < mid+100; pos++) {

    OSP_SET_AND_FIRE(pos*F_CPU / 1000000);

    //while (OSP_INPROGRESS());         // This just shows how you would wait if nessisary - not nessisary in this application. 

    _delay_ms(20);      // Wait a sec to let the audience clap

  }
  
  for (pos = mid+100; pos > mid-100; pos--) {

    OSP_SET_AND_FIRE(pos*F_CPU / 1000000);

    //while (OSP_INPROGRESS());         // This just shows how you would wait if nessisary - not nessisary in this application. 

    _delay_ms(20);      // Wait a sec to let the audience clap

  }

}
