Browse Source

Example setup code bug

The code was doing:
pinMode(slaveSelectPin, OUTPUT);
pinMode(slaveSelectPin, HIGH);

Second pinMode should be digitalWrite
main
Kurt Eckhardt 7 years ago
parent
commit
f2dc0cfd96
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      examples/DigitalPotControl/DigitalPotControl.ino

+ 1
- 1
examples/DigitalPotControl/DigitalPotControl.ino View File

void setup() { void setup() {
// set the slaveSelectPin as an output: // set the slaveSelectPin as an output:
pinMode (slaveSelectPin, OUTPUT); pinMode (slaveSelectPin, OUTPUT);
pinMode (slaveSelectPin, HIGH);
digitalWrite (slaveSelectPin, HIGH);
// initialize SPI: // initialize SPI:
SPI.begin(); SPI.begin();
} }

Loading…
Cancel
Save