You need to start with some requirements that can be implemented. You need to start with some hardware that can be use to implement those requirements.
How is the Arduino supposed to know that the microphone is, or is not, at the correct height? If it is not, how is the Arduino supposed to move it?