Use Serial monitor in the IDE and Serial.print in the code to tell what the code is doing, in strategic, important places.