From 2c1728f086051c602a16f943aea99f55ae8fa3b8 Mon Sep 17 00:00:00 2001 From: Peter Van Hoyweghen Date: Sun, 30 Aug 2015 20:36:39 +0200 Subject: [PATCH] Use digitalWrite() only with values HIGH and LOW. --- build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index 73c2fcc7e..a791f210b 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -181,7 +181,7 @@ public: uint8_t transfer (uint8_t b) { for (unsigned int i = 0; i < 8; ++i) { - digitalWrite(MOSI, b & 0x80); + digitalWrite(MOSI, (b & 0x80) ? HIGH : LOW); digitalWrite(SCK, HIGH); delayMicroseconds(pulseWidth); b = (b << 1) | digitalRead(MISO);