PIR Sensor output controlled by potentiometer?


Very new to Arduino. I have set up a project today that is essentially doing what I want it to but I'm curious about another consideration I had.

Is it possible to modulate a jingle played - say by a buzzer - activated from a PIR sensor?

Look at the tone() function.

Thanks wvmarle! Sorry I reread my post and realized I left out whether I could control the tone's volume or pitch via a potentiometer.

Volume: in whatever you use to produce sound from the tone signal.

Pitch: in the Arduino. Read the pot value, turn that into a frequency (look at the map() function for linear conversion, but as it's for a sound frequency you may want to find an exponential formula instead).