I'm building a toy for my little boy with a bunch a blinky lights, buttons and plugs.
I'd like to put a Pot on so that it will make a clicking sound when he turns it or change the flashing rate of an LED.
The 500k variable resistor is connected fine and I can Serial.print it's values correctly. The values are logarithmic (i think). Can anyone suggest a way to convert the values so that when the knob is turned the clicking or flashing speed has more of a x=y ratio?
Sounds like you have a pot with an "audio taper". A simple way to correct (without fancy math) is to characterize the pot. Set it to the 0-degree setting (all the way counterclockwise), take a reading, store it in a spreadsheet. Turn the pot to 10 degrees, take a reading, store it in the spreadsheet. Continue all the way around.
Now, turn this spreadsheet around. Store it in an array in your code, then whenever you get a reading, look it up in the table (you'll have to look between two nearest values) and the index into the table is the linearized return value.
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons