     checkNotes(reflectedLightValues, pluckedNotes);
   }
 
+  //checkButtons();
+  checkSonar();
+
+  //It just read item 7. So going backwards, read items 6 through zero.
+  for (int i = numberNotes - 2; i >= 0; i--)
+  {
+    reflectedLightValues[i] = stepTheMotorAndGetLightReading(BACKWARD);
+    checkNotes(reflectedLightValues, pluckedNotes);
+  }
+
   checkButtons();
   checkSonar();
 
-  //It just read item 7. So going backwards, read items 6 through zero.
-  for (int i = numberNotes - 2; i >= 0; i--)
-  {
-    reflectedLightValues[i] = stepTheMotorAndGetLightReading(BACKWARD);
-    checkNotes(reflectedLightValues, pluckedNotes);
-  }
-
-  checkButtons();
-  checkSonar();
-
-}
+}

#else
  while (Serial.available() > 0)
  {
    char c = Serial.peek();
    if (c != 'f' && c != 'b')
    {
      break;
    }
    else
    {
      myMotor->step(stepSize, c == 'b' ? BACKWARD : FORWARD, DOUBLE);
      Serial.read();
    }
  }
#endif

boolean pluckedNotes[numberNotes];
int reflectedLightValues[numberNotes];


#define LOGLEVEL LOG_LEVEL_NOOUTPUT 
//#define LOGLEVEL LOG_LEVEL_ERRORS
//#define LOGLEVEL LOG_LEVEL_INFOS
//#define LOGLEVEL LOG_LEVEL_DEBUG
//#define LOGLEVEL LOG_LEVEL_VERBOSE

void setup()
{
