瀏覽代碼

Example setup code bug

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

Second pinMode should be digitalWrite
main
Kurt Eckhardt 7 年之前
父節點
當前提交
f2dc0cfd96
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      examples/DigitalPotControl/DigitalPotControl.ino

+ 1
- 1
examples/DigitalPotControl/DigitalPotControl.ino 查看文件

@@ -37,7 +37,7 @@ const int slaveSelectPin = 10;
void setup() {
// set the slaveSelectPin as an output:
pinMode (slaveSelectPin, OUTPUT);
pinMode (slaveSelectPin, HIGH);
digitalWrite (slaveSelectPin, HIGH);
// initialize SPI:
SPI.begin();
}

Loading…
取消
儲存