   }
 }
 
+// -------------------------
+//         Main Loop
+// -------------------------
 void loop() 
 {
   period = getPeriod();

  delayFixed(period);
}

bool isActive() 
{
  return digitalRead(ACTIVATION_PIN) == LOW;

// -------------------------
// Generic Utility Functions
// -------------------------
void delayFixed(long ms)
{
  if (ms < 16)
