From c57a9fefeea80ab94d40acdddadfa462224af96c Mon Sep 17 00:00:00 2001 From: rob tillaart Date: Sun, 24 Apr 2016 19:21:50 +0200 Subject: [PATCH] fix initialization (autoincrement) --- libraries/PCA9635/PCA9635.cpp | 4 +++- libraries/PCA9635/PCA9635.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/PCA9635/PCA9635.cpp b/libraries/PCA9635/PCA9635.cpp index 9152c593..65f7a3a2 100644 --- a/libraries/PCA9635/PCA9635.cpp +++ b/libraries/PCA9635/PCA9635.cpp @@ -2,11 +2,12 @@ // FILE: PCA9635.cpp // AUTHOR: Rob Tillaart // DATE: 23-apr-2016 -// VERSION: 0.1.00 +// VERSION: 0.1.01 // PURPOSE: I2C PCA9635 library for Arduino // URL: // // HISTORY: +// 0.1.01 set autoincr in constructor // 0.1.00 initial BETA version // @@ -21,6 +22,7 @@ PCA9635::PCA9635(const uint8_t deviceAddress) // TWBR = 12; // 400KHz _data = 0; _error = 0; + writeReg(PCA9685_MODE1, 0x81); // AUTOINCR | NOSLEEP | ALLADRR } // write value to single PWM registers diff --git a/libraries/PCA9635/PCA9635.h b/libraries/PCA9635/PCA9635.h index 1094f943..112be12e 100644 --- a/libraries/PCA9635/PCA9635.h +++ b/libraries/PCA9635/PCA9635.h @@ -2,7 +2,7 @@ // FILE: PCA9635.H // AUTHOR: Rob Tillaart // DATE: 23-apr-2016 -// VERSION: 0.1.00 +// VERSION: 0.1.01 // PURPOSE: I2C PCA9635 library for Arduino // URL: https://github.com/RobTillaart/Arduino/tree/master/libraries //