 int pos;
 int maxt = MAX + OFFSET;
 int mint = MIN + OFFSET;
-int mid = round((float)(maxt+mint)/2.0);
+double mid = 191.62;
+double amp = 23.30;
+long start;
 
 // Setup the one-shot pulse generator and initialize with a pulse width that is (cycles) clock counts long
 

  Serial.begin(38400);
  osp_setup();
  OSP_SET_WIDTH(254);
}

void loop()
{
  // Step though 0-19 cycle long pulses for demo purposes 
  long start = micros();
  //for(int i=0; i < 150; i++)
  //{
    OSP_FIRE(); //160 = 10us


  }
  
  for (pos = 192; pos > 168; pos--) {

    OSP_SET_AND_FIRE(pos);

    //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

  }

}
