Arduino code for implementing knock detection.