 double Kp = 0.02;//0.06;
 double Ki = 0.05;//0.05;
 double Kd = 0.0005;//0.0005;
-//double OS = 18;
-//double BrkPt = 22;
-//double X = 0.0;
 double PIDOut = 0.0;
-double Max = 254.0;
-double Min = 0.0;
+double Max = 254.0; //max allowed PWM value
+double Min = 1.0; //min allowed PWM value
 int SampleTime = 60;// measured in milliseconds [FWIW: 10,000 RPM measured over 10 revolutions = 60 ms]
 int MstrSampleTime = SampleTime;
 

{
  int UsrInput = 0;
  int stopCnt = 0;
  //  lcdPosition (lcdHandle, 0, 0) ; lcdPuts (lcdHandle, "Speed Cntl Ready") ;
  lcd.setCursor(0,1);
  lcd.print("Speed Cntl Ready");
  //  lcdPosition (lcdHandle, 0, 1) ; lcdPrintf (lcdHandle, " Set RPM: %d",trgtRPM) ;
  lcd.setCursor(0,0);
  sprintf (buf,"Set RPM: %d", trgtRPM);
  lcd.print(buf);

 lcd.setCursor(0,1); //lcd.setCursor(pos,line)
 sprintf (buf, "CYCLE PWR 2 STRT");
 lcd.print(buf);
 delay(10000);
 return;
}
// ================================================================
