From e0924f25d24833804968b83ca0a81852392c51ea Mon Sep 17 00:00:00 2001 From: Armin Date: Tue, 8 Oct 2024 19:17:20 +0200 Subject: [PATCH] Bumped version to 3.2.0 --- README.md | 8 +++----- .../MatrixPatternsTest/EasyButtonAtInt01.h | 1 + examples/MatrixPatternsTest/HexDump.hpp | 4 ++-- .../MatrixPatternsTest/digitalWriteFast.h | 19 +++++++++---------- .../TwoPatternsOnOneStrip/EasyButtonAtInt01.h | 1 + library.json | 2 +- library.properties | 4 ++-- src/NeoPatterns.h | 8 ++++---- 8 files changed, 23 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index a5bb17d..25857b5 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ This is an extended version version of the [NeoPattern example by Adafruit](https://learn.adafruit.com/multi-tasking-the-arduino-part-3?view=all).
New Patterns are added, a [snake game running on a matrix](https://github.com/ArminJo/NeoPatterns/blob/master/examples/SnakeGame/SnakeGame.ino) is included and you can run [multiple patterns simultaneously on the same strip](https://github.com/ArminJo/NeoPatterns/blob/master/examples/TwoPatternsOnOneStrip/TwoPatternsOnOneStrip.ino). -### [Version 3.1.2](https://github.com/ArminJo/NeoPatterns/archive/master.zip) - work in progress - [![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)     [![Badge Version](https://img.shields.io/github/v/release/ArminJo/NeoPatterns?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/ArminJo/NeoPatterns/releases/latest) @@ -38,7 +36,7 @@ Available as [Arduino library "NeoPatterns"](https://www.arduinolibraries.info/l | [![Demonstration of NeoPatterns](https://i.ytimg.com/vi/CsB7FkywCRQ/hqdefault.jpg)](https://www.youtube.com/watch?v=CsB7FkywCRQ) | [![Demonstration of MatrixDemo on a 10x10 matrix](https://i.ytimg.com/vi/URsq28l2PEQ/hqdefault.jpg)](https://www.youtube.com/watch?v=URsq28l2PEQ) | | YouTube Video of NeoPatternsDemo on a long matrix | YouTube Video of Fire on on a long matrix | | [![Demonstration of NeoPatterns on a long matrix ](https://i.ytimg.com/vi/y_fmAEUqhFg/hqdefault.jpg)](https://www.youtube.com/watch?v=y_fmAEUqhFg) | [![Demonstration of Fire on a long matrix ](https://i.ytimg.com/vi/CgW5T-mRSvQ/hqdefault.jpg)](https://youtu.be/CgW5T-mRSvQ?t=43) | -| YouTube Video of OpenLedRace at the Cologne public library MINTk�ln-Festival | | +| YouTube Video of OpenLedRace at the Cologne public library MINTköln-Festival | | | [![OpenLedRace in action](https://i.ytimg.com/vi/y25rjRkDg0g/hqdefault.jpg)](https://www.youtube.com/watch?v=y25rjRkDg0g) | |
@@ -64,7 +62,7 @@ The original **SCANNER** pattern is extended and includes the **CYLON** as well - FIRE adapted from [FastLed](https://github.com/FastLED/FastLED/tree/master/examples/Fire2012) ## Patterns only for n x n Matrix -- MOVING_PICTURE* +- MOVING_PICTURE - MOVE - TICKER - FIRE @@ -227,7 +225,7 @@ It also shows, how to dynamically **determine the length of the attached strip**
# Revision History -### Version 3.1.2 - work in progress +### Version 3.2.0 - Added functions `getActualNeopixelLenghtSimple()`, `clearAndShow()`, `setMatrixPixelColorAndShow()` and `testMapping()`. - Improved `SNOW` pattern. - New handling for `USER_PATTERN1` and `USER_PATTERN2` and new UserPattern example. diff --git a/examples/MatrixPatternsTest/EasyButtonAtInt01.h b/examples/MatrixPatternsTest/EasyButtonAtInt01.h index 0de2514..2491db1 100644 --- a/examples/MatrixPatternsTest/EasyButtonAtInt01.h +++ b/examples/MatrixPatternsTest/EasyButtonAtInt01.h @@ -393,6 +393,7 @@ void __attribute__ ((weak)) handleINT1Interrupt(); /* Version 3.4.1 - 12/2023 * - Avoid wrong double press detection if calling checkForDoublePress() after release of button. + * - Hack for ATmega 644. * * Version 3.4.0 - 10/2023 * - Added NO_INITIALIZE_IN_CONSTRUCTOR macro to enable late initializing. diff --git a/examples/MatrixPatternsTest/HexDump.hpp b/examples/MatrixPatternsTest/HexDump.hpp index def5733..b3b8d45 100644 --- a/examples/MatrixPatternsTest/HexDump.hpp +++ b/examples/MatrixPatternsTest/HexDump.hpp @@ -108,10 +108,10 @@ void printMemoryHexDump(uint8_t *aMemory, uint16_t aNumberOfBytesToPrint, uint8_ */ Serial.print(F(" ")); for (uint_fast8_t i = 0; i < aBytesPerLine; i++) { - char tCharacterToPrint = aMemory[tIndex + i]; + uint8_t tCharacterToPrint = aMemory[tIndex + i]; // if(isalnum(tIndex+i)){ // requires 40 bytes more program space if (' ' <= tCharacterToPrint && tCharacterToPrint <= '~') { - Serial.print(tCharacterToPrint); + Serial.print((char)tCharacterToPrint); } else if (tCharacterToPrint != 0x00 && tCharacterToPrint != 0xFF) { // for non printable characters except 0 and FF Serial.print('.'); diff --git a/examples/MatrixPatternsTest/digitalWriteFast.h b/examples/MatrixPatternsTest/digitalWriteFast.h index 043ae71..a36a71f 100644 --- a/examples/MatrixPatternsTest/digitalWriteFast.h +++ b/examples/MatrixPatternsTest/digitalWriteFast.h @@ -11,6 +11,14 @@ #ifndef __digitalWriteFast_h_ #define __digitalWriteFast_h_ 1 +//#define THROW_ERROR_IF_NOT_FAST // If activated, an error is thrown if pin is not a compile time constant +void NonConstantsUsedForPinModeFast( void ) __attribute__ (( error("Parameter for pinModeFast() function is not constant") )); +void NonConstantsUsedForDigitalWriteFast( void ) __attribute__ (( error("Parameter for digitalWriteFast() function is not constant") )); +void NonConstantsUsedForDigitalToggleFast( void ) __attribute__ (( error("Parameter for digitalToggleFast() function is not constant") )); +int NonConstantsUsedForDigitalReadFast( void ) __attribute__ (( error("Parameter for digitalReadFast() function is not constant") )); + +#if !defined(MEGATINYCORE) // megaTinyCore has it own digitalWriteFast function set, except digitalToggleFast(). + //#define SANGUINO_PINOUT // define for Sanguino pinout // general macros/defines @@ -29,10 +37,6 @@ #include // declarations for the fallback to digitalWrite(), digitalRead() etc. -#if defined(MEGATINYCORE) -#error Do not use "#include digitalWriteFast.h" because megaTinyCore has it own digitalWriteFast function set, except digitalToggleFast(). -#endif - // --- Arduino Mega and ATmega128x/256x based boards --- #if (defined(ARDUINO_AVR_MEGA) || \ defined(ARDUINO_AVR_MEGA1280) || \ @@ -316,12 +320,6 @@ #endif - -void NonConstantsUsedForPinModeFast( void ) __attribute__ (( error("Parameter for pinModeFast() function is not constant") )); -void NonConstantsUsedForDigitalWriteFast( void ) __attribute__ (( error("Parameter for digitalWriteFast() function is not constant") )); -void NonConstantsUsedForDigitalToggleFast( void ) __attribute__ (( error("Parameter for digitalToggleFast() function is not constant") )); -int NonConstantsUsedForDigitalReadFast( void ) __attribute__ (( error("Parameter for digitalReadFast() function is not constant") )); - #if !defined(digitalWriteFast) # if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) && defined(__digitalPinToPortReg) # if defined(THROW_ERROR_IF_NOT_FAST) @@ -420,4 +418,5 @@ if (__builtin_constant_p(P)) { \ # endif #endif // !defined(digitalToggleFast) +#endif // !defined(MEGATINYCORE) #endif //__digitalWriteFast_h_ diff --git a/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h b/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h index 0de2514..2491db1 100644 --- a/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h +++ b/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h @@ -393,6 +393,7 @@ void __attribute__ ((weak)) handleINT1Interrupt(); /* Version 3.4.1 - 12/2023 * - Avoid wrong double press detection if calling checkForDoublePress() after release of button. + * - Hack for ATmega 644. * * Version 3.4.0 - 10/2023 * - Added NO_INITIALIZE_IN_CONSTRUCTOR macro to enable late initializing. diff --git a/library.json b/library.json index a12936f..0e244c0 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "type": "git", "url": "https://github.com/ArminJo/NeoPatterns" }, - "version": "3.1.1", + "version": "3.2.0", "exclude": "pictures", "authors": { "name": "Armin Joachimsmeyer", diff --git a/library.properties b/library.properties index 014aa5b..841cc3b 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=NeoPatterns -version=3.1.1 +version=3.2.0 author=Armin Joachimsmeyer maintainer=Armin Joachimsmeyer sentence=Patterns for NeoPixel strips and matrixes including the patterns of the NeoPattern example by Adafruit. -paragraph=Patterns from Adafruit are: SCANNER, STRIPES, DELAY, PROCESS_SELECTIVE, FADE_SELECTIVE. The original SCANNER pattern is extended and includes the CYLON as well as the ROCKET or FALLING_STAR pattern. The more versatile STRIPES pattern replaces the old THEATER_CHASE one. NeoPixel-Matrix pattern are: MOVING_PICTURE, MOVE, TICKER, FIRE, SNAKE. +paragraph=Patterns from Adafruit are: SCANNER, STRIPES, DELAY, PROCESS_SELECTIVE, FADE_SELECTIVE. The original SCANNER pattern is extended and includes the CYLON as well as the ROCKET or FALLING_STAR pattern. The more versatile STRIPES pattern replaces the old THEATER_CHASE one. NeoPixel-Matrix pattern are: MOVING_PICTURE, MOVE, TICKER, FIRE, SNOW, SNAKE. category=Display url=https://github.com/ArminJo/NeoPatterns architectures=avr,megaavr,esp8266,esp32,stm32,STM32F1 diff --git a/src/NeoPatterns.h b/src/NeoPatterns.h index 7f59b36..129a279 100644 --- a/src/NeoPatterns.h +++ b/src/NeoPatterns.h @@ -48,10 +48,10 @@ #define PROGMEM #endif -#define VERSION_NEOPATTERNS "3.1.1" +#define VERSION_NEOPATTERNS "3.2.0" #define VERSION_NEOPATTERNS_MAJOR 3 -#define VERSION_NEOPATTERNS_MINOR 1 -#define VERSION_NEOPATTERNS_PATCH 1 +#define VERSION_NEOPATTERNS_MINOR 2 +#define VERSION_NEOPATTERNS_PATCH 0 // The change log is at the bottom of the file /* @@ -394,7 +394,7 @@ void __attribute__((weak)) UserPattern2(NeoPatterns *aNeoPatterns, color32_t aCo #endif /* - * Version 3.1.2 - 09/2024 + * Version 3.2.0 - 09/2024 * - Added functions `getActualNeopixelLenghtSimple()`, `clearAndShow()`, `setMatrixPixelColorAndShow()` and `testMapping()`. * - Improved SNOW pattern. * - New handling for USER_PATTERN1 and USER_PATTERN2 and new UserPattern example.