Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
|
This example will work with all types of Trill sensor and will allow you to adjust the sensitivity and threshold settings.
The first thing to do is make sure that the correct sensor type is given to touchSensor.setup();
. If you have changed the address of the sensor then you will need to add that to this function too.
The Trill sensor is scanned on an auxiliary task running parallel to the audio thread.
Launch the GUI to visualise the value of each capacitive channel on the sensor.
There are two important sensor settings that you may want to adjust when working with the Trill sensors: the threshold
and the prescaler
.
The threshold
setting is simply the threshold above which to read and is for ignoring any noise that might be present in the lowest regions of the sensor reading. This only applies to DIFF
mode and is a float between 0.0 and 1.0. Typically values would stay below 0.1.
The prescaler
setting equates to the sensitivity of the sensor. Technically, this value is a divider for the clock on the cypress chip and so it decides how long the chip charges the connected material for before taking a reading. There are 8 different settings for the prescaler.
The rule of thumb when adjusting these values is:
When connecting different materials to Trill Craft we recommend experimenting with the settings using this example. This example allows you to experiment with different settings from within the GUI which you can then hard code in your project once you're happy with the behaviour of the sensors.