I'm not sure on how to feed data to a digital pot manually moving a knob like on an analog pot. What do I need for this?
Wouldn't that just be a switch? Or are you thinking of connecting it via a PWN digital port?
Would be better I guess to connect it to Analogue as a knob is an analogue input device.
I want to be able to store 3 different positions for the digital pot but to figure out what those positions are I want to move a pot to the desire position instead of writing the code with the actual output position. It's for a simpler user interface.
You need to break the project down in to requirements.
- read a potentiometer and then map the values to 0 - 255. Print the values for debugging.
- learn how to use a digital Pot http://arduino.cc/en/Tutorial/SPIDigitalPot
- Use manual pot to control digital pot.
- Use program or eeprom to store values desired to work with digital pot.
- continue improvement until satisfied.
You will need an analog potentiometer for this to work so what you need to do is plugin in both the analog and digital potentiometer so use analogread to read the value and my arduino uno outputs a 10bit value and lets just pretend that the digital potentiometer is a 7bit one so you need to divide it by the proper factor to get that what you need to do is this divided the max value of the adc by the max value of the potentiometer in the sample case this would be 1024/128=8 so I would need to divided the return value of analogRead by 8 and then send it to the potentiometer like it says in the datasheet.
I just had one question why not just an analog potentiometer if all you want to do is feed the value into the digital one?
What would be better would be to use a rotary encoder, such that you can detect its rotation direction and pulses; then use that information to increase or decrease a variable, and pass that value on to the digital potentiometer. Doing it this way would give you the ability to rotate your knob freely and without end-stops.
I am not 100% sure what the benefits of using a pot to control the output of a digital pot would be :~