Hi Phil,
When you use and ADC component and use:
ReadAsByte, the the value retrieved will be 0 to 255 (0 to 5V)
ReadAsInt, the the value retrieved will be 0 to 1023 (0 to 5V)
So you can use one of the above and convert from bytes or int direct to dB's
I did create a flowchart that works as a volume control which can be found here:
http://www.matrixmultimedia.com/mmforum ... 99&#p45599
instead of volume you can have dB's
My guess the easiest way is to use the fourth gang of the pot and feed it with +5V one end and 0V the other, then the voltage out from the wiper will be proportional to the how far spinal has been rotated.
E.g if using ReadAsByte, and spindle is rotated a quarter of the way then
Voltage on the wiper = 1/4 * 5 = 1.25
Bytes = 255/5 * 1.25 = 64 or 255/4 =
Or if using ReadAsInt:
Int = 1023/5 * 1.25 = 256
Next thing to work out is the relationship between bytes (or int ) and dB's
There may not be so then you will need to use look-up tables (information on LUT's can be found by searching the forum)
Then you can directly enter the value of dB and the corresponding value of bytes.
There are free online courses and examples of different flowcharts in the learning centre:
http://www.matrixmultimedia.com/lc_index.php?p=12
Martin