Skip to content

Commit

Permalink
Merge remote-tracking branch 'megaavr-arduino/master' into nona4809+c…
Browse files Browse the repository at this point in the history
…ompat
  • Loading branch information
facchinm committed May 24, 2019
2 parents ae148cf + eba33b8 commit da7693d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ void loop() {
void digitalPotWrite(int address, int value) {
// take the SS pin low to select the chip:
digitalWrite(slaveSelectPin, LOW);
delay(100);
// send in the address and value via SPI:
SPI.transfer(address);
SPI.transfer(value);
delay(100);
// take the SS pin high to de-select the chip:
digitalWrite(slaveSelectPin, HIGH);
}

0 comments on commit da7693d

Please sign in to comment.