Arduino - Ultrasonic Sensor for use instead of analog potentiometer for proximity control I was hoping someone could assist me with a project. I have built a device which uses a potentiometer (analog) to control an audio filter (analog). I was looking to use the arduino dual ultrasonic sensor module (HC-SR04) to replace the potentiometer in this circuit to act almost like a proximity sensor; raising the filter cut off when a person gets close to the sensor. Do you know anyone who might be able to help in coding this? and also, what needs to be connected to what?? Thank you for any help you can provide. The potentiometer I would like to replace with the sensor is circled in red. I don't use the 'Fine Tune' potentiometer next to this, so please ignore.
The HCSR04 module is a digital proximity sensor, needing a microcontroller to read values from it. If you really want to use this then you will have to use a microcontroller as a digital to analog converter and map distance values from the HCSR04 to voltages.

However, a better solution would be to use some kind of analog distance sensor. I have used the Sharp IR distance sensors before (with Pololu carrier) and have had great success. This model also comes in a 3V flavor which might simplify your circuit design. You would now only need some analog circuitry to get the voltage values into the correct range.