 This Program when loaded on an Arduino/Leonardo is a Tach based speed controller.
 It was originally written to operate a 400W/48VDC CNC spindle motor through
 a simple electronic controller, readily found on E-Bay
-This program assumes that the +PWM lead of this controller is connected to
-pin D13 of the Leonardo, and the collector output of the speed sensor 
+This program assumes that the +PWM lead of the controller is connected to
+pin D13 of the Leonardo (or Pin D11 on the UNO), and the collector output of the speed sensor 
 [OPB704 is a direct pin-for-pin replacement for the once popular,
 but now discontinued, QRB1114; the Parallax Inc 550-27401 or FairChild qrd1114
 might also maybe adapted to work] is connected to pin D3. 
 Note this collector is also tied +5Volts through a 20K pull-up resistor.
 It Furhter assumes that a Sansmart 16x2 LCD/KeyPad sheild has been installed.
 This display & keypad provides a simple user interface, where the Up/Down buttons
-will ramp the speed from 1400 to 10,000RPM in steps of 200RPM, and the Left/Right
-Button select the display mode.
-
-Note: The LCDKeypadR1 Library is a derivative of the files found here:
+can be used to ramp the Set Speed from 1400 to 10,000 RPM, in steps of 200 RPM, 
+while the Left/Right Buttons will select the display mode.
+
+Note: The LCDKeypadR1 Library, contained in this file set, 
+is a derivative of the files found here:
 
 http://sainsmart.com/zen/documents/20-011-901/keypad_lcd.zip
 

  //then LCD setup seemed to go OK, & you're ready to start the speed control stuff

  // Calc initial dutycycle based on trgtRPM
  //dutycycle = (int) 75*(trgtRPM/9800.0)*(trgtRPM/9800.0) ;
  //int valA = (trgtRPM - 1500)/140;
   //StrtDC =((valA*valA)/14)+22;
   //StrtDC = 30;
   SpndlPWM = (int) 95.0*(trgtRPM/9800.0)*(trgtRPM/9800.0) ; //190.5*(trgtRPM/9800.0)*(trgtRPM/9800.0)

  //pinMode (GPIOpin, PWM_OUTPUT) ; //configure pin 1 as a PWM output
  //pwmSetMode (PWM_MODE_MS); //configure PWM output to operate in Mark / Space mode
  //pwmSetMode (PWM_MODE_BAL); //configure PWM output to operate in Mark / Balanced Mode
  //pwmSetRange (range) ;// This sets the range register in the PWM generator. The default is 1024.
 // pwmSetClock (5) ;// This sets the divisor for the PWM clock.

// pinMode (GPIOpinSlow, OUTPUT) ; //configure pin 1 as a simple output pin
// digitalWrite (GPIOpinSlow, LOW); //set/force pin 4 output High[Under Speed LED off]
// pinMode (GPIOpinOK, OUTPUT) ; //configure pin 5 as a simple output pin
// digitalWrite (GPIOpinOK, LOW); //set/force pin 5 output  High[Speed Ok LED off]
// pinMode (GPIOpinFast, OUTPUT) ; //configure pin 6 as a simple output pin
// digitalWrite (GPIOpinFast, LOW); //set/force pin 6 output  High[Over Speed LED off]



  // display counter value every 1/4 second.
  //sprintf (buf, "Time %d Max %d\n", TotalRunTime, MaxRunTime);
  //Serial1.println(buf);
  while ( TotalRunTime <= MaxRunTime && !ExitNow )
  {
    
    while (eventCounter == 0 && LoopCounter == 0 &&  TotalRunTime <= MaxRunTime && !ExitNow)
     {
      //Motor is not running, So initialize PID for next startup

      }
     else
      {
       strncpy(SgndErStr, " ", 8);
       strcat(SgndErStr, SpdErStr);
      }
