Control-Surface icon indicating copy to clipboard operation
Control-Surface copied to clipboard

Can I connect a HC-SR04 module instead of a potentiometer?

Open e36910 opened this issue 3 years ago • 5 comments

I would like to try to make a sensor expression pedal from this module Скриншот 20-10-2021 214420

e36910 avatar Oct 20 '21 18:10 e36910

You cannot use it as a potentiometer, because you have to drive it differently, it doesn't output an analog signal.
However, there are plenty of tutorials on the internet on how to measure the distance, and once you have that, you can map it to a range from 0 to 127 (or 0 to 16383 for a 14-bit control) and send it over MIDI as explained in https://tttapa.github.io/Control-Surface-doc/Doxygen/d3/df7/midi-tutorial.html#midi_md-sending.

tttapa avatar Oct 20 '21 23:10 tttapa

I found a library for this device - https://bitbucket.org/teckel12/arduino-new-ping/downloads/ Is it possible to link this library with Control Surface?

e36910 avatar Oct 21 '21 09:10 e36910

Is it possible to link this library with Control Surface?

You don't have to link the libraries.
The ping library gives you a value, and then you send that value over MIDI using Control Surface.

tttapa avatar Oct 23 '21 12:10 tttapa

There is a link to the files https://www.youtube.com/watch?v=mWa1He9FP5U

Wallirec avatar Nov 26 '21 22:11 Wallirec

I have already made this but I was using an Arduino Nano and Midi.h library. You can find everything about that at my website https://www.criusdigitalstudio.com/projects-english/crius-force-control-sonar-midi-controller . You can easily use it with the Control Surface library with small changes in the code.

CriusDigitalStudio avatar May 16 '22 20:05 CriusDigitalStudio