Greetings to the community!
I am building an arduino project to control my modular synthesizer with some sensors.
Currently I am using a HC-SR04 sensor, so that when it gets a distance value greater than 20 cm it will output a ON signal from the Digital port of the arduino and use this signal as a trigger.
What I would like to achieve is to have the distance measured by the sensor to open/close a filter… so I don’t want it to output just an on/off signal from the Digital port but use instead PWM to create a continue voltage value that can change in time. Does anyone knows if this is possible or not or has suggestion from where I should start?