always play in the ground function

but there is another actions going in the loop

You have not posted your code so we cannot see what it is doing.

At a guess you are using the delay() function and/or a for loop and/or a while loop that stops the loop() function running freely so that the sensor can be read frequently and the display updated.

Post your code.