I'm new here, so be kind to me :D
I'm currently programming a theremin on arduino, using a IR sensor Sharp 2D120X. My code is working just fine within the sensor's range, but when I'm out of the range, the sensor sends me random values (for example: when the closest object is the ceiling 2m away). The problem is that I use this sensor for the frequency. So whenever my hand is not in the sensor's range, I still have a random melody.
That apart, everything's working just fine.
Do you have any idea/solution to avoid this melody when I'm out of the range?