   myMotor->step(steps, directionToStep, DOUBLE);
 }
 
-void setupMotor() {
-  AFMS.begin();  // create with the default frequency 1.6KHz
-  myMotor->setSpeed(250);
-
+void autoPositionMirror() {
   int maxLight = 0;
   int maxLightStep = 0;
   for (int i = 0; i < gMotorStepsPerRev; i++) {
+    if (i % (gMotorStepsPerRev / 10) == 0)
+    {
+      Serial.print(F("."));
+    }
     stepMotor(FORWARD, 1);
-    int sample = sampleLight(10);
+    int sample = sampleLight(30);
     logMeter(Log, sample, 600, LOG_LEVEL_INFOS);
     if (sample > maxLight) 
     {


void setNoteCountCmd() 
{
  Serial.println(F("Running setNoteCountCmd"));
  char * str = sCmd.next();
  if (str && *str)
  {
    int val = atoi(str);
    if (val > 1)
    {
      Serial.print(F("Before: ")); Serial.println(gNoteCount);
      gNoteCount = val;

#define MIDICMD_NOTEON     0x90 // MIDI command (Note On, Channel 0)
#define MIDICMD_NOTEOFF    0x80 // MIDI command (Note On, Channel 0)

#define NOTE_COUNT_MAX      10 // kinda a hack to allow static initialization in waitForNote

GinSing  gGS;            // this creates the class library from which all methods and data are accessed
GinSingPoly * gGSPoly =     NULL;

GSNote gGSNote[NOTE_COUNT_MAX] = {C_6, CS_6, D_6, DS_6, E_6, F_6, FS_6, G_6, GS_6, A_6};

bool gMidi             =   false;
bool gGinsing          =   true;
int  gNoteCount        =   10;
bool gMute             =   false;

