From 533ec5729657fc9cce36875dddb58b4e8c4886c7 Mon Sep 17 00:00:00 2001 From: Armin Date: Mon, 6 Jun 2022 23:32:41 +0200 Subject: [PATCH] Bumped version to 3.0.0 --- README.md | 7 ++- examples/AllPatternsOnMultiDevices/ADCUtils.h | 1 - examples/MatrixPatternsTest/AVRUtils.h | 1 - .../MatrixPatternsTest/EasyButtonAtInt01.h | 1 - .../MatrixPatternsTest/digitalWriteFast.h | 54 +++++++++---------- examples/MatrixSnow/AVRUtils.h | 1 - examples/OpenLedRace/AVRUtils.h | 1 - examples/OpenLedRace/MPU6050Defines.h | 1 - examples/OpenLedRace/MPU6050IMUData.h | 1 - examples/OpenLedRace/SoftI2CMasterConfig.h | 2 - .../TwoPatternsOnOneStrip/EasyButtonAtInt01.h | 1 - library.properties | 2 +- src/Colors.h | 1 - src/DebugLevel.h | 1 - src/LongUnion.h | 1 - src/MatrixNeoPatterns.h | 1 - src/MatrixNeoPixel.h | 3 -- src/MatrixSnake.h | 1 - src/NeoPatterns.h | 2 +- src/NeoPixel.h | 1 - src/fonts.h | 1 - 21 files changed, 35 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 21face8..66bb0c1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 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.0.0](https://github.com/ArminJo/NeoPatterns/archive/master.zip) - work in progress +### [Version 3.0.1](https://github.com/ArminJo/NeoPatterns/archive/master.zip) - work in progress [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Installation instructions](https://www.ardu-badge.com/badge/NeoPatterns.svg?)](https://www.ardu-badge.com/NeoPatterns) @@ -188,6 +188,8 @@ OpenLedRace at the Cologne public library MINTk ![OpenLedRace at the Cologne public library MINTköln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg) # Revision History +### Version 3.0.1 - work in progress + ### Version 3.0.0 - Enabled individual selection of patterns to save program memory. - Renamed *NeoPatterns.cpp*, *MatrixNeoPatterns.cpp* and *MatrixSnake.cpp* to *NeoPatterns.hpp*, *MatrixNeoPatterns.hpp* and *MatrixSnake.hpp*. @@ -195,6 +197,9 @@ OpenLedRace at the Cologne public library MINTk - Changed parameter for endless repeats in `initMultipleFallingStars()`. - Improved usage of `random()`. - Added function `fillRegion()`, `isActive()` and `setAdafruitBrightnessValue()`. +- Added support for brightness and brightness non zero mode. +- Fixed aDoUpdate bug for `FADE`. +- Fixed bugs in *Colors.h*. ### Version 2.4.0 - Added macros `ENABLE_PATTERN_` to enable reducing size, if some patterns are not used. diff --git a/examples/AllPatternsOnMultiDevices/ADCUtils.h b/examples/AllPatternsOnMultiDevices/ADCUtils.h index 8baeb2d..a5d635d 100644 --- a/examples/AllPatternsOnMultiDevices/ADCUtils.h +++ b/examples/AllPatternsOnMultiDevices/ADCUtils.h @@ -143,4 +143,3 @@ float getTemperature(void); #endif // defined(ADATE) #endif // defined(__AVR__) #endif // _ADC_UTILS_H -#pragma once diff --git a/examples/MatrixPatternsTest/AVRUtils.h b/examples/MatrixPatternsTest/AVRUtils.h index 803ce6a..f8b6b07 100644 --- a/examples/MatrixPatternsTest/AVRUtils.h +++ b/examples/MatrixPatternsTest/AVRUtils.h @@ -53,4 +53,3 @@ bool isAddressInRAM(void *aAddressToCheck); bool isAddressBelowHeap(void *aAddressToCheck); #endif // defined(__AVR__) #endif // _AVR_UTILS_H -#pragma once diff --git a/examples/MatrixPatternsTest/EasyButtonAtInt01.h b/examples/MatrixPatternsTest/EasyButtonAtInt01.h index 5be4455..c7f081e 100644 --- a/examples/MatrixPatternsTest/EasyButtonAtInt01.h +++ b/examples/MatrixPatternsTest/EasyButtonAtInt01.h @@ -392,4 +392,3 @@ void __attribute__ ((weak)) handleINT1Interrupt(); */ #endif // _EASY_BUTTON_AT_INT01_H -#pragma once diff --git a/examples/MatrixPatternsTest/digitalWriteFast.h b/examples/MatrixPatternsTest/digitalWriteFast.h index bea99bd..4188f64 100644 --- a/examples/MatrixPatternsTest/digitalWriteFast.h +++ b/examples/MatrixPatternsTest/digitalWriteFast.h @@ -162,7 +162,7 @@ ((((P) >= 10 && (P) <= 13) || ((P) >= 50 && (P) <= 53)) ? &PORTB : \ (((P) >= 30 && (P) <= 37) ? &PORTC : \ ((((P) >= 18 && (P) <= 21) || (P) == 38) ? &PORTD : \ -((((P) >= 0 && (P) <= 3) || (P) == 5) ? &PORTE : \ +((((P) <= 3) || (P) == 5) ? &PORTE : \ (((P) >= 54 && (P) <= 61) ? &PORTF : \ ((((P) >= 39 && (P) <= 41) || (P) == 4) ? &PORTG : \ ((((P) >= 6 && (P) <= 9) || (P) == 16 || (P) == 17) ? &PORTH : \ @@ -174,7 +174,7 @@ ((((P) >= 10 && (P) <= 13) || ((P) >= 50 && (P) <= 53)) ? &DDRB : \ (((P) >= 30 && (P) <= 37) ? &DDRC : \ ((((P) >= 18 && (P) <= 21) || (P) == 38) ? &DDRD : \ -((((P) >= 0 && (P) <= 3) || (P) == 5) ? &DDRE : \ +((((P) <= 3) || (P) == 5) ? &DDRE : \ (((P) >= 54 && (P) <= 61) ? &DDRF : \ ((((P) >= 39 && (P) <= 41) || (P) == 4) ? &DDRG : \ ((((P) >= 6 && (P) <= 9) || (P) == 16 || (P) == 17) ? &DDRH : \ @@ -186,7 +186,7 @@ ((((P) >= 10 && (P) <= 13) || ((P) >= 50 && (P) <= 53)) ? &PINB : \ (((P) >= 30 && (P) <= 37) ? &PINC : \ ((((P) >= 18 && (P) <= 21) || (P) == 38) ? &PIND : \ -((((P) >= 0 && (P) <= 3) || (P) == 5) ? &PINE : \ +((((P) <= 3) || (P) == 5) ? &PINE : \ (((P) >= 54 && (P) <= 61) ? &PINF : \ ((((P) >= 39 && (P) <= 41) || (P) == 4) ? &PING : \ ((((P) >= 6 && (P) <= 9) || (P) == 16 || (P) == 17) ? &PINH : \ @@ -241,31 +241,31 @@ #if defined(__AVR_ATmega324PB__) #define __digitalPinToPortReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PORTB : (((P) >= 8 && (P) <= 15) ? &PORTD : (((P) >= 16 && (P) <= 23) ? &PORTC : (((P) >= 24 && (P) <= 31) ? &PORTA : &PORTE)))) +(((P) <= 7) ? &PORTB : (((P) >= 8 && (P) <= 15) ? &PORTD : (((P) >= 16 && (P) <= 23) ? &PORTC : (((P) >= 24 && (P) <= 31) ? &PORTA : &PORTE)))) #define __digitalPinToDDRReg(P) \ -(((P) >= 0 && (P) <= 7) ? &DDRB : (((P) >= 8 && (P) <= 15) ? &DDRD : (((P) >= 16 && (P) <= 23) ? &DDRC : (((P) >= 24 && (P) <= 31) ? &DDRA : &DDRE)))) +(((P) <= 7) ? &DDRB : (((P) >= 8 && (P) <= 15) ? &DDRD : (((P) >= 16 && (P) <= 23) ? &DDRC : (((P) >= 24 && (P) <= 31) ? &DDRA : &DDRE)))) #define __digitalPinToPINReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PINB : (((P) >= 8 && (P) <= 15) ? &PIND : (((P) >= 16 && (P) <= 23) ? &PINC : (((P) >= 24 && (P) <= 31) ? &PINA : &PINE)))) +(((P) <= 7) ? &PINB : (((P) >= 8 && (P) <= 15) ? &PIND : (((P) >= 16 && (P) <= 23) ? &PINC : (((P) >= 24 && (P) <= 31) ? &PINA : &PINE)))) # if defined(SANGUINO_PINOUT) #define __digitalPinToBit(P) \ -(((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (((P) >= 16 && (P) <= 23) ? (7 - ((P) - 24)) : (P) - 32)))) +(((P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (((P) >= 16 && (P) <= 23) ? (7 - ((P) - 24)) : (P) - 32)))) # else //MightyCore Pinout #define __digitalPinToBit(P) \ -(((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (((P) >= 16 && (P) <= 23) ? (P) - 24 : (P) - 32)))) +(((P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (((P) >= 16 && (P) <= 23) ? (P) - 24 : (P) - 32)))) # endif #else #define __digitalPinToPortReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PORTB : (((P) >= 8 && (P) <= 15) ? &PORTD : (((P) >= 16 && (P) <= 23) ? &PORTC : &PORTA))) +(((P) <= 7) ? &PORTB : (((P) >= 8 && (P) <= 15) ? &PORTD : (((P) >= 16 && (P) <= 23) ? &PORTC : &PORTA))) #define __digitalPinToDDRReg(P) \ -(((P) >= 0 && (P) <= 7) ? &DDRB : (((P) >= 8 && (P) <= 15) ? &DDRD : (((P) >= 16 && (P) <= 23) ? &DDRC : &DDRA))) +(((P) <= 7) ? &DDRB : (((P) >= 8 && (P) <= 15) ? &DDRD : (((P) >= 16 && (P) <= 23) ? &DDRC : &DDRA))) #define __digitalPinToPINReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PINB : (((P) >= 8 && (P) <= 15) ? &PIND : (((P) >= 16 && (P) <= 23) ? &PINC : &PINA))) +(((P) <= 7) ? &PINB : (((P) >= 8 && (P) <= 15) ? &PIND : (((P) >= 16 && (P) <= 23) ? &PINC : &PINA))) # if defined(SANGUINO_PINOUT) #define __digitalPinToBit(P) \ -(((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (7 - ((P) - 24))))) +(((P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (7 - ((P) - 24))))) # else //MightyCore Pinout #define __digitalPinToBit(P) \ -(((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (P) - 24))) +(((P) <= 7) ? (P) : (((P) >= 8 && (P) <= 15) ? (P) - 8 : (((P) >= 16 && (P) <= 23) ? (P) - 16 : (P) - 24))) # endif #endif @@ -287,11 +287,11 @@ #define SPI_HW_SCK_PIN (15) //PB1 #define __digitalPinToPortReg(P) \ -((((P) >= 0 && (P) <= 4) || (P) == 6 || (P) == 12 || (P) == 24 || (P) == 25 || (P) == 29) ? &PORTD : (((P) == 5 || (P) == 13) ? &PORTC : (((P) >= 18 && (P) <= 23)) ? &PORTF : (((P) == 7) ? &PORTE : &PORTB))) +((((P) <= 4) || (P) == 6 || (P) == 12 || (P) == 24 || (P) == 25 || (P) == 29) ? &PORTD : (((P) == 5 || (P) == 13) ? &PORTC : (((P) >= 18 && (P) <= 23)) ? &PORTF : (((P) == 7) ? &PORTE : &PORTB))) #define __digitalPinToDDRReg(P) \ -((((P) >= 0 && (P) <= 4) || (P) == 6 || (P) == 12 || (P) == 24 || (P) == 25 || (P) == 29) ? &DDRD : (((P) == 5 || (P) == 13) ? &DDRC : (((P) >= 18 && (P) <= 23)) ? &DDRF : (((P) == 7) ? &DDRE : &DDRB))) +((((P) <= 4) || (P) == 6 || (P) == 12 || (P) == 24 || (P) == 25 || (P) == 29) ? &DDRD : (((P) == 5 || (P) == 13) ? &DDRC : (((P) >= 18 && (P) <= 23)) ? &DDRF : (((P) == 7) ? &DDRE : &DDRB))) #define __digitalPinToPINReg(P) \ -((((P) >= 0 && (P) <= 4) || (P) == 6 || (P) == 12 || (P) == 24 || (P) == 25 || (P) == 29) ? &PIND : (((P) == 5 || (P) == 13) ? &PINC : (((P) >= 18 && (P) <= 23)) ? &PINF : (((P) == 7) ? &PINE : &PINB))) +((((P) <= 4) || (P) == 6 || (P) == 12 || (P) == 24 || (P) == 25 || (P) == 29) ? &PIND : (((P) == 5 || (P) == 13) ? &PINC : (((P) >= 18 && (P) <= 23)) ? &PINF : (((P) == 7) ? &PINE : &PINB))) #define __digitalPinToBit(P) \ (((P) >= 8 && (P) <= 11) ? (P) - 4 : (((P) >= 18 && (P) <= 21) ? 25 - (P) : (((P) == 0) ? 2 : (((P) == 1) ? 3 : (((P) == 2) ? 1 : (((P) == 3) ? 0 : (((P) == 4) ? 4 : (((P) == 6) ? 7 : (((P) == 13) ? 7 : (((P) == 14) ? 3 : (((P) == 15) ? 1 : (((P) == 16) ? 2 : (((P) == 17) ? 0 : (((P) == 22) ? 1 : (((P) == 23) ? 0 : (((P) == 24) ? 4 : (((P) == 25) ? 7 : (((P) == 26) ? 4 : (((P) == 27) ? 5 : 6 ))))))))))))))))))) @@ -325,22 +325,22 @@ #if defined(__AVR_ATmega48PB__) || defined(__AVR_ATmega88PB__) || defined(__AVR_ATmega168PB__) || defined(__AVR_ATmega328PB__) #define __digitalPinToPortReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PORTD : (((P) >= 8 && (P) <= 13) ? &PORTB : (((P) >= 14 && (P) <= 19) ? &PORTC : &PORTE))) +(((P) <= 7) ? &PORTD : (((P) >= 8 && (P) <= 13) ? &PORTB : (((P) >= 14 && (P) <= 19) ? &PORTC : &PORTE))) #define __digitalPinToDDRReg(P) \ -(((P) >= 0 && (P) <= 7) ? &DDRD : (((P) >= 8 && (P) <= 13) ? &DDRB : (((P) >= 14 && (P) <= 19) ? &DDRC : &DDRE))) +(((P) <= 7) ? &DDRD : (((P) >= 8 && (P) <= 13) ? &DDRB : (((P) >= 14 && (P) <= 19) ? &DDRC : &DDRE))) #define __digitalPinToPINReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PIND : (((P) >= 8 && (P) <= 13) ? &PINB : (((P) >= 14 && (P) <= 19) ? &PINC : &PINE))) +(((P) <= 7) ? &PIND : (((P) >= 8 && (P) <= 13) ? &PINB : (((P) >= 14 && (P) <= 19) ? &PINC : &PINE))) #define __digitalPinToBit(P) \ -(((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 13) ? (P) - 8 : (((P) >= 14 && (P) <= 19) ? (P) - 14 : (((P) >= 20 && (P) <= 21) ? (P) - 18 : (P) - 22)))) +(((P) <= 7) ? (P) : (((P) >= 8 && (P) <= 13) ? (P) - 8 : (((P) >= 14 && (P) <= 19) ? (P) - 14 : (((P) >= 20 && (P) <= 21) ? (P) - 18 : (P) - 22)))) #else #define __digitalPinToPortReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PORTD : (((P) >= 8 && (P) <= 13) ? &PORTB : &PORTC)) +(((P) <= 7) ? &PORTD : (((P) >= 8 && (P) <= 13) ? &PORTB : &PORTC)) #define __digitalPinToDDRReg(P) \ -(((P) >= 0 && (P) <= 7) ? &DDRD : (((P) >= 8 && (P) <= 13) ? &DDRB : &DDRC)) +(((P) <= 7) ? &DDRD : (((P) >= 8 && (P) <= 13) ? &DDRB : &DDRC)) #define __digitalPinToPINReg(P) \ -(((P) >= 0 && (P) <= 7) ? &PIND : (((P) >= 8 && (P) <= 13) ? &PINB : &PINC)) +(((P) <= 7) ? &PIND : (((P) >= 8 && (P) <= 13) ? &PINB : &PINC)) #define __digitalPinToBit(P) \ -(((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 13) ? (P) - 8 : (P) - 14)) +(((P) <= 7) ? (P) : (((P) >= 8 && (P) <= 13) ? (P) - 8 : (P) - 14)) #endif // --- Arduino Uno WiFi Rev 2, Nano Every --- @@ -462,7 +462,7 @@ if (__builtin_constant_p(P) && __builtin_constant_p(V)) { \ #else #define pinModeFast pinMode #endif -#endif +#endif // !defined(pinModeFast) #if !defined(digitalReadFast) #if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) @@ -474,7 +474,7 @@ if (__builtin_constant_p(P) && __builtin_constant_p(V)) { \ #else #define digitalReadFast digitalRead #endif -#endif +#endif // !defined(digitalReadFast) #if !defined(digitalToggleFast) #if (defined(__AVR__) || defined(ARDUINO_ARCH_AVR)) @@ -487,6 +487,6 @@ if (__builtin_constant_p(P)) { \ #else #define digitalToggleFast(P) digitalWrite(P, ! digitalRead(P)) #endif -#endif +#endif // !defined(digitalToggleFast) #endif //__digitalWriteFast_h_ diff --git a/examples/MatrixSnow/AVRUtils.h b/examples/MatrixSnow/AVRUtils.h index 803ce6a..f8b6b07 100644 --- a/examples/MatrixSnow/AVRUtils.h +++ b/examples/MatrixSnow/AVRUtils.h @@ -53,4 +53,3 @@ bool isAddressInRAM(void *aAddressToCheck); bool isAddressBelowHeap(void *aAddressToCheck); #endif // defined(__AVR__) #endif // _AVR_UTILS_H -#pragma once diff --git a/examples/OpenLedRace/AVRUtils.h b/examples/OpenLedRace/AVRUtils.h index 803ce6a..f8b6b07 100644 --- a/examples/OpenLedRace/AVRUtils.h +++ b/examples/OpenLedRace/AVRUtils.h @@ -53,4 +53,3 @@ bool isAddressInRAM(void *aAddressToCheck); bool isAddressBelowHeap(void *aAddressToCheck); #endif // defined(__AVR__) #endif // _AVR_UTILS_H -#pragma once diff --git a/examples/OpenLedRace/MPU6050Defines.h b/examples/OpenLedRace/MPU6050Defines.h index b6953e5..8c6eaed 100644 --- a/examples/OpenLedRace/MPU6050Defines.h +++ b/examples/OpenLedRace/MPU6050Defines.h @@ -509,4 +509,3 @@ typedef enum { #define MPU6050_DMP_MEMORY_CHUNK_SIZE 16 #endif // _MPU6050_DEFINES_H -#pragma once diff --git a/examples/OpenLedRace/MPU6050IMUData.h b/examples/OpenLedRace/MPU6050IMUData.h index c3b0d6e..dc8cfb0 100644 --- a/examples/OpenLedRace/MPU6050IMUData.h +++ b/examples/OpenLedRace/MPU6050IMUData.h @@ -102,4 +102,3 @@ class MPU6050IMUData { bool initWire(); #endif // _MPU6050_IMU_DATA_H -#pragma once diff --git a/examples/OpenLedRace/SoftI2CMasterConfig.h b/examples/OpenLedRace/SoftI2CMasterConfig.h index bd33fc2..62387f4 100644 --- a/examples/OpenLedRace/SoftI2CMasterConfig.h +++ b/examples/OpenLedRace/SoftI2CMasterConfig.h @@ -67,5 +67,3 @@ #define I2C_FASTMODE 1 #endif // _SOFT_I2C_MASTER_CONFIG_H -#pragma once - diff --git a/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h b/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h index 5be4455..c7f081e 100644 --- a/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h +++ b/examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h @@ -392,4 +392,3 @@ void __attribute__ ((weak)) handleINT1Interrupt(); */ #endif // _EASY_BUTTON_AT_INT01_H -#pragma once diff --git a/library.properties b/library.properties index 2e3bc66..ef41f39 100644 --- a/library.properties +++ b/library.properties @@ -3,7 +3,7 @@ version=3.0.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
The SNAKE pattern is an implementation of the Snake game and can be played with 2 or 4 buttons attached to the Arduino.
The SnakeAutorun example will start your own code to solve the Snake game provided in the function getNextSnakeDirection().

YouTube demos are available under https://github.com/ArminJo/NeoPatterns.

Includes an OpenLedRace example for 2 players.

New: renamed 3 file from *.cpp to *.hpp. Added function setBrightnessValue(). Changed parameter for endless repeats in initMultipleFallingStars(). Fixed bug in Fade.
Revision History
+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
The SNAKE pattern is an implementation of the Snake game and can be played with 2 or 4 buttons attached to the Arduino.
The SnakeAutorun example will start your own code to solve the Snake game provided in the function getNextSnakeDirection().

YouTube demos are available under https://github.com/ArminJo/NeoPatterns.

Includes an OpenLedRace example for 2 players.

New: Renamed 3 file from *.cpp to *.hpp. Added function setBrightnessValue(). Changed parameter for endless repeats in initMultipleFallingStars(). Fixed bug in Fade.
Revision History
category=Display url=https://github.com/ArminJo/NeoPatterns architectures=avr,megaAVR,esp8266,esp32,STM32 diff --git a/src/Colors.h b/src/Colors.h index 01761ec..f0e80d9 100644 --- a/src/Colors.h +++ b/src/Colors.h @@ -135,4 +135,3 @@ typedef uint32_t color32_t; // end deprecated #endif // _COLORS_H -#pragma once diff --git a/src/DebugLevel.h b/src/DebugLevel.h index 4446b03..0c07533 100644 --- a/src/DebugLevel.h +++ b/src/DebugLevel.h @@ -48,4 +48,3 @@ #endif #endif // _DEBUGLEVEL_H -#pragma once diff --git a/src/LongUnion.h b/src/LongUnion.h index 94f72a1..1b8fb57 100644 --- a/src/LongUnion.h +++ b/src/LongUnion.h @@ -23,7 +23,6 @@ #if !defined(_WORD_UNION_H) || !defined(_LONG_UNION_H) -#include #include #ifndef _WORD_UNION_H diff --git a/src/MatrixNeoPatterns.h b/src/MatrixNeoPatterns.h index a030229..40bf486 100644 --- a/src/MatrixNeoPatterns.h +++ b/src/MatrixNeoPatterns.h @@ -175,4 +175,3 @@ void MatrixPatternsDemo(NeoPatterns *aLedsPtr); void myLoadTest(MatrixNeoPatterns *aLedsPtr); #endif // _MATRIX_NEOPATTERNS_H -#pragma once diff --git a/src/MatrixNeoPixel.h b/src/MatrixNeoPixel.h index c55f8ea..a763e82 100644 --- a/src/MatrixNeoPixel.h +++ b/src/MatrixNeoPixel.h @@ -139,6 +139,3 @@ uint16_t ZigzagTypeBottomRightMapping(uint8_t aColumnX, uint8_t aRowY, uint8_t a uint16_t ZigzagTypeBottomLeftMapping(uint8_t aColumnX, uint8_t aRowY, uint8_t aColumnsTotal, uint8_t aRowsTotal); #endif /* SRC_LIB_NEOPATTERNS_MATRIXNEOPIXEL_H_ */ - -#pragma once - diff --git a/src/MatrixSnake.h b/src/MatrixSnake.h index 73960ae..35f0dc6 100644 --- a/src/MatrixSnake.h +++ b/src/MatrixSnake.h @@ -168,4 +168,3 @@ void SnakeAutorunCompleteHandler(NeoPatterns *aLedsPtr); #endif #endif // _MATRIX_SNAKE_H -#pragma once diff --git a/src/NeoPatterns.h b/src/NeoPatterns.h index 1bc111e..52bfeb7 100644 --- a/src/NeoPatterns.h +++ b/src/NeoPatterns.h @@ -374,6 +374,7 @@ void __attribute__((weak)) UserPattern2(NeoPatterns *aNeoPatterns, color32_t aCo * - Added function fillRegion(), isActive() and setBrightnessValue(). * - Added support for brightness and brightness non zero mode. * - Fixed aDoUpdate bug for FADE. + * - Fixed bugs in Colors.h. * * Version 2.3.1 - 02/2021 * - Changed type of TotalStepCounter from uint16_t to int16_t. @@ -420,4 +421,3 @@ void __attribute__((weak)) UserPattern2(NeoPatterns *aNeoPatterns, color32_t aCo */ #endif // _NEOPATTERNS_H -#pragma once diff --git a/src/NeoPixel.h b/src/NeoPixel.h index 526ac9f..87ceb6d 100644 --- a/src/NeoPixel.h +++ b/src/NeoPixel.h @@ -176,4 +176,3 @@ class NeoPixel: public Adafruit_NeoPixel { extern const uint8_t GammaTable32[32] PROGMEM; #endif /* _NEOPATTERNS_NEOPIXEL_H */ -#pragma once diff --git a/src/fonts.h b/src/fonts.h index fd128b5..4621508 100644 --- a/src/fonts.h +++ b/src/fonts.h @@ -75,4 +75,3 @@ extern const uint8_t font_PGM[]; #endif // _FONTS_H -#pragma once