Digital Pot with MCP41100 with my Arduino Mega 2560 via SPI

Hi, I’m trying to make a digital Pot with the integrated circuit MCP41100 with my Arduino Mega 2560 but is not working, this is my codeo:
/*
Digital Pot Control

  • CS - to digital pin 53 (SS pin)
  • SCK - to digital pin 52 (SCK pin)
  • SI - to digital pin 51 (MOSI pin)
    */
    // inslude the SPI library:
    ?#?include? <SPI.h>
    // set pin 53 as the slave select for the digital pot:
    const int slaveSelectPin = 53;
    void setup() {
    // set the slaveSelectPin as an output:
    pinMode (slaveSelectPin, OUTPUT);
    // initialize SPI:
    SPI.begin();
    }
    void loop() {
    // change the resistance on this channel from min to max:
    for (int level = 0; level < 255; level++) {
    digitalPotWrite(1, level);
    delay(10);
    }
    // wait a second at the top:
    delay(1000);
    // change the resistance on this channel from max to min:
    for (int level = 0; level < 255; level++) {
    digitalPotWrite(1, 255 - level);
    delay(10);
    }
    }
    void digitalPotWrite(int address, int value) {
    // take the SS pin low to select the chip:
    digitalWrite(slaveSelectPin,LOW);
    // send in the address and value via SPI:
    SPI.transfer(address);
    SPI.transfer(value);
    // take the SS pin high to de-select the chip:
    digitalWrite(slaveSelectPin,HIGH);
    }

If someone can help me, I’ll really appreciate! Thanks in advance! :smiley: