aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorSimonePDA <majocchi@aquariusedizioni.it>2018-04-02 19:18:50 +0200
committerMartino Facchin <m.facchin@arduino.cc>2018-04-12 10:21:36 +0200
commit380241dd17a4ba36cfa2c297d036292bcc0d13bb (patch)
tree92aa693cf910b4e5b5992100acfd3da7dca54319 /libraries
parent3d09a51bd20f095e1354243e6d8addedfcb6001e (diff)
Update DigitalPotControl.ino
Fixing SPI communication with a delay as pointe out in #6395
Diffstat (limited to 'libraries')
-rw-r--r--libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino2
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino b/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino
index c7afcc0..8719058 100644
--- a/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino
+++ b/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino
@@ -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);
}