SPI issue: Using easyVR shield and DigPot:AD5206

apologies in advance if I cannot explain this issue correctly as my coding/micro-controller experience is only a few months old.

What i am attempting is a project to control an electric wheelchair using an Arduino Uno.

At present I am attempting to create a system which uses speech recognition as the input for additional functions such as turning on the chair lights and indicators and input from distance sensors (Sharp infra red distance sensor) to analyze head motions which will control the movements of the chair.

I have developed code for the Arduino which implements this and seems to be working well enough.

What I would like to do now is to introduce a digital potentiometer into the system (what I have is Analog Devices AD5206). At present I just have the distance sensors output being examined for a threshold such that, for example, if the value is above 400, send a signal for the chair to move forward, if it’s below 200 send a signal for the chair to reverse.

I am hoping that by adding the AD5206 I can improve the system so that the chair can move proportionally to the head gestures so as in the example above values over 400 will be mapped and used to set the resistance of the AD5206 so that if just over 400 the chair would move slowly forward and if it’s say 600 it would move forward faster.

The issue I have is that when I start to communicate with the AD5206 the easyVR shield stops listening for a command, I am guessing that this is an S.P.I. issue but my limited knowledge has left me at an impasse and any advice would be greatly appreciated.

I am going to attach the code below and try include all relevant details,

code.ino (11.1 KB)

Oh, what might also help:

From documentation I believe the shield uses D12 & D13 on the arduino.

The AD5206 is connected: CS to D10 SDI to D11 CLK to D13