The threshold is just to make sure it was a real knock, and not some other vibration from the room. You can adjust this value to see what works best for you. A5 was just selected on the Arduino because I was originally using this in part of a larger project. You can use any of the analog inputs (as long as your circuit and program match)