Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #32, setLedDriverMode(uint8_t mode) #33

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.6.0] - 2024-01-18
- fix #32, setLedDriverMode(uint8_t mode)
- minor edits (examples)

----

## [0.5.0] - 2023-12-11
= refactor API, begin()
- refactor API, begin()
- add **uint8_t getAddress()**
- update readme.md
- update examples
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016-2023 Rob Tillaart
Copyright (c) 2016-2024 Rob Tillaart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions PCA9635.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// FILE: PCA9635.cpp
// AUTHOR: Rob Tillaart
// DATE: 23-apr-2016
// VERSION: 0.5.0
// VERSION: 0.6.0
// PURPOSE: Arduino library for PCA9635 I2C LED driver, 16 channel PWM, 8 bit
// URL: https://github.com/RobTillaart/PCA9635

Expand Down Expand Up @@ -517,7 +517,7 @@ uint8_t PCA9635::setLedDriverMode(uint8_t mode)
mask = 0b00000000;
break;
}
for (int reg = 0; reg < 3; reg++)
for (int reg = 0; reg < 4; reg++)
{
writeLedOut(reg, mask);
}
Expand Down
6 changes: 2 additions & 4 deletions PCA9635.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FILE: PCA9635.h
// AUTHOR: Rob Tillaart
// DATE: 23-apr-2016
// VERSION: 0.5.0
// VERSION: 0.6.0
// PURPOSE: Arduino library for PCA9635 I2C LED driver, 16 channel PWM, 8 bit
// URL: https://github.com/RobTillaart/PCA9635

Expand All @@ -12,7 +12,7 @@
#include "Wire.h"


#define PCA9635_LIB_VERSION (F("0.5.0"))
#define PCA9635_LIB_VERSION (F("0.6.0"))


// mode codes
Expand Down Expand Up @@ -107,8 +107,6 @@
#define PCA9635_MODE2_NONE 0x00


// NOT IMPLEMENTED YET (TODO check)
//
// Registers in which the ALLCALL and sub-addresses are stored
// NEW
#define PCA963X_SUBADR(x) (0x17 +(x)) // x = 1..3
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ PCA.writeLedOut(1, mask);
- return values etc.
- documentation.
- keep in sync with PCA9634/5 developments

- remove OLD #defines PCA9635_... => PCA963X
- const int?

#### Could

Expand Down
4 changes: 1 addition & 3 deletions examples/PCA9635_OE_control/PCA9635_OE_control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// URL: https://github.com/RobTillaart/PCA9635


#include "Arduino.h"
#include "Wire.h"
#include "PCA9635.h"


Expand All @@ -17,7 +15,7 @@ void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("PCA9635 LIB version: ");
Serial.print("PCA9635_LIB_VERSION: ");
Serial.println(PCA9635_LIB_VERSION);
Serial.println();

Expand Down
18 changes: 8 additions & 10 deletions examples/PCA9635_performance/PCA9635_performance.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// URL: https://github.com/RobTillaart/PCA9635


#include "Arduino.h"
#include "Wire.h"
#include "PCA9635.h"


Expand All @@ -18,33 +16,33 @@ void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("PCA9635 LIB version: ");
Serial.print("PCA9635_LIB_VERSION: ");
Serial.println(PCA9635_LIB_VERSION);
Serial.println();

Wire.begin();

ledArray.begin();

delay(100); // flush all Serial interrupts
delay(100); // flush Serial buffer / interrupts
start = micros();
ledArray.write1(0, 127); // 50%
ledArray.write1(0, 127); // PWM at ~50%
stop = micros();
Serial.print("ONE:\t");
Serial.println(stop - start);

delay(100); // flush all Serial interrupts
delay(100); // flush Serial buffer / interrupts
start = micros();
ledArray.write1(0, 127); // ~50%
ledArray.write1(1, 128); // ~50%
ledArray.write1(0, 127); // PWM at ~50%
ledArray.write1(1, 128); // PWM at ~50%
stop = micros();
Serial.print("TWO:\t");
Serial.println(stop - start);

delay(100); // flush all Serial interrupts
delay(100); // flush Serial buffer / interrupts
uint8_t n = 123;
start = micros();
ledArray.writeN(0, &n, 1); // ~50%
ledArray.writeN(0, &n, 1); // PWM at ~50%
stop = micros();
Serial.print("wrN:\t");
Serial.println(stop - start);
Expand Down
4 changes: 1 addition & 3 deletions examples/PCA9635_shift_rotate/PCA9635_shift_rotate.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// URL: https://github.com/RobTillaart/PCA9635


#include "Arduino.h"
#include "Wire.h"
#include "PCA9635.h"


Expand All @@ -21,7 +19,7 @@ void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("PCA9635 LIB version: ");
Serial.print("PCA9635_LIB_VERSION: ");
Serial.println(PCA9635_LIB_VERSION);
Serial.println();

Expand Down
4 changes: 1 addition & 3 deletions examples/PCA9635_test01/PCA9635_test01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// URL: https://github.com/RobTillaart/PCA9635


#include "Arduino.h"
#include "Wire.h"
#include "PCA9635.h"


Expand All @@ -17,7 +15,7 @@ void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("PCA9635 LIB version: ");
Serial.print("PCA9635_LIB_VERSION: ");
Serial.println(PCA9635_LIB_VERSION);
Serial.println();

Expand Down
4 changes: 1 addition & 3 deletions examples/PCA9635_test_multiple/PCA9635_test_multiple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// URL: https://github.com/RobTillaart/PCA9635


#include "Arduino.h"
#include "Wire.h"
#include "PCA9635.h"


Expand All @@ -18,7 +16,7 @@ void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("PCA9635 LIB version: ");
Serial.print("PCA9635_LIB_VERSION: ");
Serial.println(PCA9635_LIB_VERSION);
Serial.println();

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/PCA9635.git"
},
"version": "0.5.0",
"version": "0.6.0",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PCA9635
version=0.5.0
version=0.6.0
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for PCA9635 I2C LED driver, 16 channel PWM, 8 bit.
Expand Down
Loading