Strobe Frequency Calculation, how its done? I'm using the Arduino sketch for LED stroboscope found here: http://mehax.blogspot.co.uk/2011/02/arduino-stroboscope.html. 

Also below, I've inserted the loop part where this calculations are made:

void loop() {
// this while is a workaround for timer limitations using micros vs millis
sensorValue = analogRead(analogInPin);   //take potentiometer reading
hold = sensorValue*55 + 400;             //add some time to scale and for code execution
microsCurrent = micros();                // collect current time
if (microsCurrent &gt; microsPrev + hold){  //set up timing loop
frequency = 1000000/(microsCurrent - microsPrev);    
microsPrev = microsPrev + hold;            //set up millis for delay stuff

//set all 6 LEDs high (they were already plugged in)
digitalWrite(3,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
digitalWrite(11,HIGH);
delayMicroseconds(.02*hold);  //leave LEDs on long enough to see

//set all LEDs low
digitalWrite(3,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);

if(millis() &gt; millisSerial + 200){ 
  millisSerial=millis();    //reset timer
  holdFrequency = 1000000/hold;    
  //do some math to find values
  rpm = frequency * 60;


I want to use this code in my project, but I don't really understand how this code calculates the stobing frequency. 

So, I have following questions:


Why "hold" variable is calculated in the given way?
Why "microsCurrent", "microsPrev" and all other timings are executed?
How "frequency is calculated"?
What is "hold frequency" variable?


Sorry, I'm very new to Arduino and don't know much coding. 
Will appreciate very much your help!
Why "hold" variable is calculated in the given way?


hold stores the intended delay between the strobe pulses, i.e. the
stroboscope period. It is computed as an affine function of the
potentiometer cursor position because... well, that's the simplest way
to make it user-adjustable. 400&nbsp;µs is the shortest period that
(according to the program author) one may reasonably want to set.


  Why "microsCurrent", "microsPrev" and all other timings are executed?


See the Blink Without
Delay Arduino
tutorial.


  How "frequency is calculated"?


From the code:

frequency = 1000000/(microsCurrent - microsPrev);


The frequency is the inverse of the period. The period is the time
elapsed between this strobe and the previous one. The numerator is a
conversion factor to get the frequency in hertz from a period in
microseconds.


  What is "hold frequency" variable?


It's the intended frequency (inverse of the intended period),
disregarding the timing jitter that makes the actual instantaneous
frequency slightly different.