Explorar el Código

Example setup code bug

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

Second pinMode should be digitalWrite
main
Kurt Eckhardt hace 7 años
padre
commit
f2dc0cfd96
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      examples/DigitalPotControl/DigitalPotControl.ino

+ 1
- 1
examples/DigitalPotControl/DigitalPotControl.ino Ver fichero

@@ -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();
}

Cargando…
Cancelar
Guardar