BLUETOOTH SPI MCP41010 Digital Pot

hello friends, I am pretty new to arduino and SPI interfacing. I am doing a project which involves controlling led brightness using bluetooth. for this i am using a MCP41010 digital pot with a SPI interface. I am having a problem in obtaining data from the bluetooth app and sending it over to the digital pot over the SPI interface.

#include<SPI.h>
#include<SoftwareSerial.h>
#define CS 10
#define SPICLK 13
#define DATAIN 11
byte address = 0x11;
int input;
int i=0;
void setup() {
SPI.begin();
Serial.begin(9600);

pinMode(CS, OUTPUT);
pinMode(DATAIN, INPUT);
pinMode(SPICLK,OUTPUT);
digitalWrite(CS,LOW);
// put your setup code here, to run once:

}

void loop() {
if(Serial.available()>0)
{
input= Serial.read();

if(input=='3')
{
Serial.println("ON");
digitalWrite(CS,HIGH);
SPI.transfer(address);
SPI.transfer(0x030);
digitalWrite(CS,LOW);
delay(1000);
}
if(input==128)
{
Serial.println("ON");
digitalWrite(CS,HIGH);
SPI.transfer(address);
SPI.transfer(0x80);
digitalWrite(CS,LOW);
delay(1000);
}
if(input==255)
{
Serial.println("ON");
digitalWrite(CS,HIGH);
SPI.transfer(address);
SPI.transfer(0xFF);
digitalWrite(CS,LOW);
delay(1000);
}
this is the code i have used. in this code , the led always remains ON and there is no variation in brightness when i send the signal over the bluetooth to arduino to the digital pot. Please help as i am extremely new to this field.