From: Dobrica Pavlinusic Date: Sun, 27 Dec 2015 19:37:47 +0000 (+0100) Subject: do more correct matrix.scan() without hardware SPI X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=99821cf8f5fdc428c47b4df9902ed7b9d5c16325;p=Arduino do more correct matrix.scan() without hardware SPI --- diff --git a/Hub08_LedMatrix/Hub08_LedMatrix.ino b/Hub08_LedMatrix/Hub08_LedMatrix.ino index d0a48de..c7d4c7f 100644 --- a/Hub08_LedMatrix/Hub08_LedMatrix.ino +++ b/Hub08_LedMatrix/Hub08_LedMatrix.ino @@ -137,10 +137,14 @@ void loop() *(dest + i) = ( *(src + j) << o ) | (( *(src + j + 1) & ( 0xff << 8 - o ) ) >> 8 - o ); i++; j++; +#if USE_SPI matrix.scan(); +#endif } j++; // skip off-screen character used for smooth scroll -// matrix.scan(); +#if ! USE_SPI + matrix.scan(); +#endif } } }