I understand you, the wave should only change if the output is zero, but how do I write the code? Thanks