Hi to all and tank you for any suggestion,
I have a question about advanced using of potentiometers, but I can use an example to explain better what I mean.
there are many solutions to control an RGB led with arduino and potentiometers.
something like these:
My question is valid for this hack but also for many others..
There is a way to control simultaneously the three colors (RGB) with 3 potentiometers without a swicth (es:1) and only one analog input?
I would use 3 potentiometer, in series, that have different load on a single analog input so that the sum of their values would be useful to generate an unic number for decoding rgb different amount.
To explain better the idea look this image:
in this case (i don't how to realize it), I should have a single value (es: 195) that would be enough to set up the three values of RGB led.
(in the example 195 => 1 for Blue(lowest intensity), 9 for green (max intensity) and 5 for red (medium intensity)
could someone help me to understand if this solution is possible and, in that case, some suggestion to realize it?
I agree, it's not possible to read 3 pots and work out how far each one is rotated using with a single pin. If it's specifically analog pins you are short of, you could use 1 analog pin and 3 digital pins (or 2 at a push) to achieve this.
I would recommend three transistors that each tie the potentiometer moving pin to the same analog input. Drive the three transistors from three digital pins (or two, with a binary-to-selector decoder :-).
The sketch would read one value, and then switch which one is active, and then do anything else, each time through the loop. This gives the single analog input some time to stabilize before the next input is read.