Debugging with Serial Monitor

Serial.print can be a great way to troubleshoot problems. You'll need to be sure to include Serial.begin in your setup though. Then you can do a Serial.print at any point in your sketch to make sure you've made it to that point in the program or print a variable to make sure the sketch is progressing as you intended.