Control the sound of buzzer and vibrator motor

Hi,
I'm still new with the Arduino.
I have a project now, which is use to detect the obstacles.
May I know is it possible to code the program such as: the sound of buzzer and the vibration motor will increases as the obstacles is approaching closely for alert the user to keep away from the obstacles.
So, is it possible to do it?

Can anyone share some ideas here.

Thanks

What do you mean by increase? Volume, pitch, or maybe beep frequency?

For the sound buzzer is volume, when the obstacles is closely, buzzer will triggered the highest volume, and vice-versa.

While for the vibrator motor, when the obstacles is closely, the motor will vibrates with the highest speed to notify the users.

Thanks

What type of buzzer do you have (active piezo, passive piezo, or voice coil)? If you don't know you can post a link to where you bought the buzzer from or to the datasheet. Please use the chain links icon on the toolbar to make links clickable.

How are you driving the buzzer and the motor?

Hi, everyone

Sorry here, i re-upload my previous question.

I have one question here. Is it possible we control the volume of buzzer such as from low volume to high volume?

I'm using the buzzer that i attached photo above.

I now have one project, what i have to do is the buzzer able to generate the different mode of sound for different distance
For example the distance is 9 cm, buzzer will produce the strongest sound meanwhile distance is 30 cm, buzzer will produce weakest sound.

So, if the buzzer above cannot do it, can anyone here suggest me what kind of buzzer able to set the volume of sound of buzzer?

Thanks here.

SKU125754a.JPG

Threads merged.

It's very frustrating to me that instead of answering my questions of a month ago, you went to the product page and downloaded an image but then didn't bother to post the information that was available on that product listing or a link to it. I then had to do a reverse image search just to find the listing:

There are some volume control libraries here: