question on programming the digital potentiometer

looking at the SPI DigiPot turorial in http://arduino.cc/en/Tutorial/SPIDigitalPot

there's this line of code here:

void loop() {
  // go through the six channels of the digital pot:
  for (int channel = 0; channel < 6; channel++) {
    // change the resistance on this channel from min to max:
    for (int level = 0; level < 255; level++) {
      digitalPotWrite(channel, level);
      delay(10);
    }
    // wait a second at the top:
    delay(100);
    // change the resistance on this channel from max to min:
    for (int level = 0; level < 255; level++) {
      digitalPotWrite(channel, 255 - level);
      delay(10);
    }
  }

}

is it necessary to go through all six channels or can i use just one or two channels?
the way i'm visualizing my circuit i won't need all the other channels.

i am planning to design a current sensor/reader using the digital potentiometer, btw.

is it necessary to go through all six channels

No.

can i use just one or two channels?

Yes.

hi PaulS, thanks for the reply! i will do some coding to test it out and hopefully things'll work. :slight_smile: