Using an Infrared Distance Sensor as MIDI Controller from little-scale:
This is a simple example of using an infrared distance sensor as a MIDI controller. The hardware setup is simple – analog out to analog input on the Teensy, ground to ground and 5V to 5V.
Featured Adafruit Products
IR distance sensor includes cable (10cm-80cm) – GP2Y0A21YK0F – This SHARP distance sensor bounces IR off objects to determine how far away they are. It returns an analog voltage that can be used to determine how close the nearest object is. Comes with 12″ long 3-JST interface wire. These sensors are good for short-range detection. For over 1 m distance, we suggest using sonar sensors. (read more)