I am new to the Arduino scene,so please bare withe me if my questions seem obvious! ...but was wondering if i could get any thoughts on the following please:

I have a bluetooth controller for my iphone which controls the volume with two separate switches, one for volume up and one for volume down. The range of the volume covers 15 switch activations. For my project I need to control the volume using a rotary motion, so for this I have a 10 turn potentiometer and a Arduino Uno.

I think I understand the basic principle of how this needs to work, for every 68 step increase (of the 1024 step resolution) of the potentiometer, the volume up switch needs to be activated. As well as this recognising a decrease in steps to activate the volume down switch. Does this sound right?

Could anyone please point me in the right direction how i should begin setting this up and coding it or be able to show me some example of code of maybe a similar project.

Any help and advice would be much appreciated and sorry if i am covering obvious ground!

Could anyone please point me in the right direction how i should begin setting this up and coding it or be able to show me some example of code of maybe a similar project.

Step one: Do the analogue input tutorial with your potentiometer and have it write to the serial port whenever you think a button press should have occurred so you can check with the serial monitor if your program does what it should.

Step two: Start a new project to send button presses to your volume control. Best take the basic button tutorial and add the code to press a button on the remote. You're going to need to figure out on your own how those button presses are going to happen.

Step three: Apply what you learned in step one and two to create the thing you want.

I have worked out how to control the volume switches by using a quad bilateral switch (74HC4016).

I have mapped the potentiometer and programmed it activate the volume up switch every 68th step.

How do I program it so when its turned the opposite way it activates the volume down switch with out activating the volume up switch? So if the wiper is decreased then it activates a different port to the port when its increased. Does that make sense?

Comment #1: every one of your cases in your switch/case is the same.Comment #2: digitalwrite takes about 3.5 microseconds (give or take) to switch the state of a pin - you need to give time for the switch to respondComment #3: you don't use ledPin anywhereComment #4: you don't keep track of the current volumeComment #5: I think they meant the "insert code" button in the toolbar - you can also type in [ code ] and [ / code ] without spaces.

What you have done makes sense to me but i cant seem to actually get it to work. The volume is constantly trying to reduce (can tell this as the bluetooth device beeps when you hit the lowest volume level, so its constantly beeping). The serial monitor reads the pot as the text changes when the pot rotates but after maybe 5 mins it crashes arduino! Otherwise nothing else seems to work and i am sure i have set everything up in the right way! Not really sure were to go next?

I dont suppose anyone uk based does freelance work! Would be willing to pay anyone to set this up and have it working if I mailed them the components?

So if I turn the volume myself to max and set the potentiometer up in the position for having the volume turned up full. The arduino will reduce the volume itself a few levels before i turn it. Then when i do turn it, the volume doesnt reduce till after at least 5 of the 10 possible turns. Once turned all the way down, it continually tries to reduce the volume further.

Any ideas what could be going wrong?

I have attached my arduino set up to see if you maybe able to notice anything wrong with my set up:

I'd been inclined to suggest a rotary encoder. Don't worry about absolute position. Just click the up button if spun clockwise, down if anticlockwise. Then perhaps add complexity so that a sustained rotation continually presses the button. Pots are a bit unpredictable