The countDown function accepts a total time T in seconds and integer steps. It displays T, then waits half that time and displays the remaining time, continuing to halve and display the time after each wait until only 1/2^steps of the original time remains. At that point, it waits the final time, displays 0 and emits an audio tone.