Skip to content

Commit c57a9fe

Browse files
committed
fix initialization (autoincrement)
1 parent d5306a3 commit c57a9fe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libraries/PCA9635/PCA9635.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// FILE: PCA9635.cpp
33
// AUTHOR: Rob Tillaart
44
// DATE: 23-apr-2016
5-
// VERSION: 0.1.00
5+
// VERSION: 0.1.01
66
// PURPOSE: I2C PCA9635 library for Arduino
77
// URL:
88
//
99
// HISTORY:
10+
// 0.1.01 set autoincr in constructor
1011
// 0.1.00 initial BETA version
1112
//
1213

@@ -21,6 +22,7 @@ PCA9635::PCA9635(const uint8_t deviceAddress)
2122
// TWBR = 12; // 400KHz
2223
_data = 0;
2324
_error = 0;
25+
writeReg(PCA9685_MODE1, 0x81); // AUTOINCR | NOSLEEP | ALLADRR
2426
}
2527

2628
// write value to single PWM registers

libraries/PCA9635/PCA9635.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// FILE: PCA9635.H
33
// AUTHOR: Rob Tillaart
44
// DATE: 23-apr-2016
5-
// VERSION: 0.1.00
5+
// VERSION: 0.1.01
66
// PURPOSE: I2C PCA9635 library for Arduino
77
// URL: https://github.com/RobTillaart/Arduino/tree/master/libraries
88
//

0 commit comments

Comments
 (0)