Code checking before programming

larryd:
Looking good.

You only need one.

You would read the value of the pot.
Then 'map' the reading to a reasonable range.
Then divide the values of all three R G B by the mapped value.
Maybe the mapping could be 0-1023 to 1-5

Example:
Let’s say the pot was set to center, the reading would be 512.
The let’s say you 'map' 512 to 2
Let’s say R=100 G=50 and B=80
Then after dividing R G B by 2 would give: R=50 G=25 and B=40
Therefore the same colour but less bright.

I think that would be awesome to do. Ideally what I'm trying to accomplish is the three knobs having their own individual value, R, B, G, so my 4 year old can learn what mixing the colors does. A little bit of blue and green makes yellow, red and blue make purple, all three make white, etc.

Just an educational toy.