Hi guys,
I'm trying to run a code on an Arduino Uno board that utilises a HC-S04 sensor along with a Flex sensor and a couple of switches which will send MIDI messages to a DAW (Ableton Live). I am currently stuck on working with the code. What I have at the moment is a program for the HC-SR04 sensor to be able to send MIDI messages to Ableton and I am able to map it onto the MIDI mappings to adjust the parameters. I have another program for the flex sensor and switches to both send MIDI messages and do the same thing too on Ableton.
I am currently stuck on a couple of issues:
-
Not too sure how to merge the two codes together in order for both of them to work with Ableton. And if the two codes are merged together, how do I prevent the HC-SR04 sensor from being MIDI mapped onto ableton live when I want to map the flex sensor or switches? Because the ultrasonic sensor would still be running continuously hence making Ableton's MIDI mapping function always detect it first.
-
The code for the flex sensor with switches allows me to adjust the parameters, but for the flex sensor, it does not allow me to adjust the parameter's full range, e.g. as I bend the flex sensor, only half the range of values of the parameter is being adjusted.
I am not too great with coding so I hope I am lucky enough to get some help! Thank you!
I have attached the two codes so do have a look and enlighten me please!
Flex_Switch_Code.ino (11.6 KB)
Ultrasonic_Sensor_Code.ino (519 Bytes)