From ae1391e636c62b9d2958182d654935799b580dd0 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Fri, 5 Jan 2024 17:10:53 +0100 Subject: [PATCH] 0.7.1 PCA9685 --- libraries/PCA9685_RT/CHANGELOG.md | 5 +++++ libraries/PCA9685_RT/LICENSE | 2 +- libraries/PCA9685_RT/PCA9685.cpp | 2 +- libraries/PCA9685_RT/PCA9685.h | 4 ++-- .../examples/PCA9685_OE_control/PCA9685_OE_control.ino | 3 +-- .../examples/PCA9685_allOFF_test/PCA9685_allOFF_test.ino | 4 ++-- .../PCA9685_digitalWrite_test.ino | 8 +++----- .../examples/PCA9685_maxPWM_test/PCA9685_maxPWM_test.ino | 6 ++---- .../PCA9685_setFrequency_offset.ino | 6 ++---- .../PCA9685_setFrequency_test.ino | 6 ++---- .../PCA9685_RT/examples/PCA9685_test01/PCA9685_test01.ino | 7 +++---- .../PCA9685_RT/examples/PCA9685_test02/PCA9685_test02.ino | 6 ++---- libraries/PCA9685_RT/library.json | 2 +- libraries/PCA9685_RT/library.properties | 2 +- libraries/PCA9685_RT/test/unit_test_001.cpp | 4 ++-- 15 files changed, 30 insertions(+), 37 deletions(-) diff --git a/libraries/PCA9685_RT/CHANGELOG.md b/libraries/PCA9685_RT/CHANGELOG.md index 75d74147..060d9295 100644 --- a/libraries/PCA9685_RT/CHANGELOG.md +++ b/libraries/PCA9685_RT/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.7.1] - 2024-01-05 +- minor edits examples +- fix version nr in .cpp + + ## [0.7.0] - 2023-12-21 - fix #25, support for Arduino ESP32 S3 - breaking change - update examples diff --git a/libraries/PCA9685_RT/LICENSE b/libraries/PCA9685_RT/LICENSE index eae2a1a7..cef01c5e 100644 --- a/libraries/PCA9685_RT/LICENSE +++ b/libraries/PCA9685_RT/LICENSE @@ -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 diff --git a/libraries/PCA9685_RT/PCA9685.cpp b/libraries/PCA9685_RT/PCA9685.cpp index 68be69fa..d69a9f4d 100644 --- a/libraries/PCA9685_RT/PCA9685.cpp +++ b/libraries/PCA9685_RT/PCA9685.cpp @@ -2,7 +2,7 @@ // FILE: PCA9685.cpp // AUTHOR: Rob Tillaart // DATE: 24-apr-2016 -// VERSION: 0.6.0 +// VERSION: 0.7.1 // PURPOSE: Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit. // URL: https://github.com/RobTillaart/PCA9685_RT diff --git a/libraries/PCA9685_RT/PCA9685.h b/libraries/PCA9685_RT/PCA9685.h index 02c155c4..b2abb3ce 100644 --- a/libraries/PCA9685_RT/PCA9685.h +++ b/libraries/PCA9685_RT/PCA9685.h @@ -3,7 +3,7 @@ // FILE: PCA9685.h // AUTHOR: Rob Tillaart // DATE: 24-apr-2016 -// VERSION: 0.7.0 +// VERSION: 0.7.1 // PURPOSE: Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit. // URL: https://github.com/RobTillaart/PCA9685_RT @@ -12,7 +12,7 @@ #include "Wire.h" -#define PCA9685_LIB_VERSION (F("0.7.0")) +#define PCA9685_LIB_VERSION (F("0.7.1")) // ERROR CODES #define PCA9685_OK 0x00 diff --git a/libraries/PCA9685_RT/examples/PCA9685_OE_control/PCA9685_OE_control.ino b/libraries/PCA9685_RT/examples/PCA9685_OE_control/PCA9685_OE_control.ino index 509c1109..70f712c0 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_OE_control/PCA9685_OE_control.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_OE_control/PCA9685_OE_control.ino @@ -5,8 +5,6 @@ // URL: https://github.com/RobTillaart/PCA9685_RT -#include "Arduino.h" -#include "Wire.h" #include "PCA9685.h" @@ -16,6 +14,7 @@ PCA9685 ledArray(0x20); void setup() { Serial.begin(115200); + Serial.println(__FILE__); Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/examples/PCA9685_allOFF_test/PCA9685_allOFF_test.ino b/libraries/PCA9685_RT/examples/PCA9685_allOFF_test/PCA9685_allOFF_test.ino index fca1840e..650caf6d 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_allOFF_test/PCA9685_allOFF_test.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_allOFF_test/PCA9685_allOFF_test.ino @@ -1,7 +1,7 @@ // // FILE: PCA9685_allOFF_test.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT // // sets all channels to a PWM @@ -20,7 +20,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/examples/PCA9685_digitalWrite_test/PCA9685_digitalWrite_test.ino b/libraries/PCA9685_RT/examples/PCA9685_digitalWrite_test/PCA9685_digitalWrite_test.ino index 89294101..2e85110c 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_digitalWrite_test/PCA9685_digitalWrite_test.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_digitalWrite_test/PCA9685_digitalWrite_test.ino @@ -1,7 +1,7 @@ // // FILE: PCA9685_digitalWrite_test.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT // // sets one channel to max PWM 0..4095 @@ -9,8 +9,6 @@ // to see the frequency of the PWM -#include "Arduino.h" -#include "Wire.h" #include "PCA9685.h" @@ -25,7 +23,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); @@ -54,7 +52,7 @@ void loop() if (now - lastTime >= 1000) { lastTime = now; - // make a copy + // make a copy noInterrupts(); uint16_t t = count; count = 0; diff --git a/libraries/PCA9685_RT/examples/PCA9685_maxPWM_test/PCA9685_maxPWM_test.ino b/libraries/PCA9685_RT/examples/PCA9685_maxPWM_test/PCA9685_maxPWM_test.ino index 171514cd..65b4e4b8 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_maxPWM_test/PCA9685_maxPWM_test.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_maxPWM_test/PCA9685_maxPWM_test.ino @@ -1,7 +1,7 @@ // // FILE: PCA9685_maxPWM_test.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT // // sets one channel to max PWM 0..4095 @@ -9,8 +9,6 @@ // to see the frequency of the PWM -#include "Arduino.h" -#include "Wire.h" #include "PCA9685.h" @@ -24,7 +22,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/examples/PCA9685_setFrequency_offset/PCA9685_setFrequency_offset.ino b/libraries/PCA9685_RT/examples/PCA9685_setFrequency_offset/PCA9685_setFrequency_offset.ino index 5e0c004f..99afff9a 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_setFrequency_offset/PCA9685_setFrequency_offset.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_setFrequency_offset/PCA9685_setFrequency_offset.ino @@ -1,7 +1,7 @@ // // FILE: PCA9685_setFrequency_offset.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT // // This sketch is to determine the offset needed to get te best matching @@ -14,8 +14,6 @@ // Note: the higher the frequency, the more inaccurate the real frequency, -#include "Arduino.h" -#include "Wire.h" #include "PCA9685.h" @@ -35,7 +33,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/examples/PCA9685_setFrequency_test/PCA9685_setFrequency_test.ino b/libraries/PCA9685_RT/examples/PCA9685_setFrequency_test/PCA9685_setFrequency_test.ino index 84af477f..dd8821f3 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_setFrequency_test/PCA9685_setFrequency_test.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_setFrequency_test/PCA9685_setFrequency_test.ino @@ -1,7 +1,7 @@ // // FILE: PCA9685_setFrequency_test.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT // // sets one channel to max PWM 0..4095 @@ -9,8 +9,6 @@ // to see the frequency of the PWM -#include "Arduino.h" -#include "Wire.h" #include "PCA9685.h" @@ -28,7 +26,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/examples/PCA9685_test01/PCA9685_test01.ino b/libraries/PCA9685_RT/examples/PCA9685_test01/PCA9685_test01.ino index d2c83c0c..eb6df9e2 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_test01/PCA9685_test01.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_test01/PCA9685_test01.ino @@ -1,11 +1,10 @@ // // FILE: PCA9685_test01.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT -#include "Arduino.h" -#include "Wire.h" + #include "PCA9685.h" @@ -16,7 +15,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/examples/PCA9685_test02/PCA9685_test02.ino b/libraries/PCA9685_RT/examples/PCA9685_test02/PCA9685_test02.ino index 3f8b7b04..ab1cb84a 100644 --- a/libraries/PCA9685_RT/examples/PCA9685_test02/PCA9685_test02.ino +++ b/libraries/PCA9685_RT/examples/PCA9685_test02/PCA9685_test02.ino @@ -1,12 +1,10 @@ // // FILE: PCA9685_test02.ino // AUTHOR: Rob Tillaart -// PUPROSE: test PCA9685 library +// PURPOSE: test PCA9685 library // URL: https://github.com/RobTillaart/PCA9685_RT -#include "Arduino.h" -#include "Wire.h" #include "PCA9685.h" @@ -17,7 +15,7 @@ void setup() { Serial.begin(115200); Serial.println(__FILE__); - Serial.print("PCA9685 LIB version: "); + Serial.print("PCA9685_LIB_VERSION: "); Serial.println(PCA9685_LIB_VERSION); Serial.println(); diff --git a/libraries/PCA9685_RT/library.json b/libraries/PCA9685_RT/library.json index cc5ba114..9f890275 100644 --- a/libraries/PCA9685_RT/library.json +++ b/libraries/PCA9685_RT/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/PCA9685_RT.git" }, - "version": "0.7.0", + "version": "0.7.1", "license": "MIT", "frameworks": "*", "platforms": "*", diff --git a/libraries/PCA9685_RT/library.properties b/libraries/PCA9685_RT/library.properties index 2dcd5e68..213c6e37 100644 --- a/libraries/PCA9685_RT/library.properties +++ b/libraries/PCA9685_RT/library.properties @@ -1,5 +1,5 @@ name=PCA9685_RT -version=0.7.0 +version=0.7.1 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit. diff --git a/libraries/PCA9685_RT/test/unit_test_001.cpp b/libraries/PCA9685_RT/test/unit_test_001.cpp index 52267581..16149548 100644 --- a/libraries/PCA9685_RT/test/unit_test_001.cpp +++ b/libraries/PCA9685_RT/test/unit_test_001.cpp @@ -49,7 +49,7 @@ unittest_teardown() unittest(test_constants) { - fprintf(stderr, "\nregisterss"); + fprintf(stderr, "\n registers"); assertEqual(PCA9685_MODE1 , 0x00); assertEqual(PCA9685_MODE2 , 0x01); assertEqual(PCA9685_ALLCALLADR , 0x05); @@ -64,7 +64,7 @@ unittest(test_constants) assertEqual(PCA9685_TESTMODE , 0xFF); - fprintf(stderr, "\nerrorcodes"); + fprintf(stderr, "\n error codes"); assertEqual(PCA9685_OK , 0x00); assertEqual(PCA9685_ERROR , 0xFF); assertEqual(PCA9685_ERR_CHANNEL, 0xFE);