This approach, which basic idea we adopted from S. Hwang and K.Y. Wohn, physical pressure is measured by acoustic sound analysis. Thereby, a smart phones speaker plays a sound with a predefined frequency and the built-in microphone records it. The pressure can then be varied by applying pressure to the microphone. If the pressure is applied stronger, and therefore the microphone covered more thoroughly, the amplitude of the frequency is decreased.
To initially set the right frequencies we conducted some initial testing. After all, the frequency should be sufficiently high that it is not (or only hardly) audible by humans but should also be playable (speaker) and recognizable (microphone) by the device. This endeavor turned out to be quite challanging, because different devices are able to recognize different frequencies. For example, for one tablet PC (Acer Iconia Tab A510) we could only achieve an analyzable frequency of 10,000 Hz. A smart phone (Samsung Galaxy S4 mini) could recognize frequencies of up to 14,500 Hz. In this prototype implementation we set the frequency to 14,000 Hz. However, this frequency was problematic as it was still audible for some people and sounds of such high frequencies are perceived as very unpleasent. Furthermore, disturbing noises are still present in this frequency area and decrease the quality of the analyzed results. The output of the sound is achieved by the continous playback of a sound file, which is then analyzed with the help of a Fourier transformation with a sampling rate of 44,100 Hz. After some experimentation with different libraries, we used JTransforms (https://sites.google.com/site/piotrwendykier/software/jtransforms) verwendet.