Changed pinMode of soundetection input to INPUT in the real final code.