Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5022

Graphics, sound and multimedia • Re: Help with logarithmic potentiometer

$
0
0
What is the voltage input range of your ADC?
From what i can read between 0 and 3V
With the pot wired as you have it, its output will vary from 0V to 5V. If this matches the input range of the ADC then you should get the full range of numbers when you read the ADC and move the pot.

If your ADC range is 0-3.3V, for example, it will stop at the maximum number about 2/3 of the range of the pot. You can check this by reading the MCP3008 datasheet.

For the purpose of testing, write a simple piece of code that reads a single ADC channel and prints the raw value.
I looked again at my code for reading values, and i was doing a weird stuff with the values. Reading it raw give me something between 0.00 and 1.00 and well split all along

Statistics: Posted by Nikolls — Sun Jul 28, 2024 9:05 pm



Viewing all articles
Browse latest Browse all 5022

Trending Articles