Making closed-loop feedback using piezo element to control vibrating motor

Hi,

I am working on a project that requires me to use a vibrating motor at 100Hz. I am adding a piezo element to determine the voltage at which the frequency is at 100 Hz (because I need to ensure that the motor vibrates at 100 Hz). The voltage will be fed to the Arduino, and then to the circuit that contains the vibrating motor. I am completely stuck on how to get this coding started. Can anyone please help?

There are many posted projects that either read a piezo or control a motor. Make sure you understand both completely before combining the two.