The digital potentiometer x9c104S module can be purchased from ebay for $1.20 Australian. Using a button instead of a variable resistor can help make the project smaller and easier to design around.
Step 1: Pin Out and Wiring
The X9c104s module is setup to plug directly into the Arduino and most of the variants.
U/D = 3
CS = 2
INC = 4
The digital Potentiometer can connect to the A0 to A5 pins
with the VL and VH connection to the pos + and GND -
Step 2: Connection Check
Once you have connected the X9C104S and the buttons to the Arduino. you can run the Sketch and use the monitor to check the connection and the functionality. Enjoy