Skip to content

Commit

Permalink
Version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Dec 19, 2019
1 parent d0a7c17 commit 8ab2573
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 41 deletions.
30 changes: 14 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
language: c
sudo: false
sudo: true
cache:
directories:
- ~/arduino_ide
- ~/.arduino15/packages/
directories:
- ~/arduino_ide
- ~/.arduino15/packages/
git:
depth: false
quiet: true
depth: false
quiet: true
env:
global:
- PRETTYNAME="NeoPatterns Arduino Library"
global:
- PRETTYNAME="NeoPatterns Arduino Library"
- INSTALL_PLATFORMS="avr,esp8266,esp32,stm32"
before_install:
# Workaround for avoiding "fork/exec /bin/xtensa-lx106-elf-g++: no such file or directory"
- echo "Removing ESP8266 cache"
- rm -rf ~/.arduino15/packages/esp8266
- source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh)
- source <(curl -SLs https://raw.githubusercontent.com/ArminJo/travis-ci-arduino/master/install.sh)
install:
- arduino --install-library "Adafruit NeoPixel"
script:
Expand All @@ -25,8 +23,8 @@ script:
- build_platform esp8266
- build_platform esp32
notifications:
email:
recipients:
email:
recipients:
- armin.arduino@gmail.com
on_success: always
on_failure: always
on_success: always
on_failure: always
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,14 @@ NeoPatterns on breadboard
![NeoPatterns on breadboard](https://github.com/ArminJo/NeoPatterns/blob/master/extras/Breadboard_complete.jpg)

# Revision History
### Version 2.2.0
- Added OpenLedRace example.

### Version 2.1.0
- Ported to ESP8266 and ESP32.
- Changed signature of NeoPatterns(NeoPixel * aUnderlyingNeoPixelObject). Swapped 4. and 5. parameter to make it consistent to the NeoPixel signature.
- Added OpenLedRace example.
- Function `setPixelOffsetForPartialNeoPixel()` in NeoPixel.cpp added.

### Version 2.0.0
- Rewrite of most patterns control logic.
- Function `drawBar()` in NeoPixel.cpp added.
Expand Down Expand Up @@ -109,6 +112,8 @@ The NeoPatterns library examples are built on Travis CI for the following boards
- Arduino Uno
- Arduino Leonardo
- Arduino Mega 2560
- ESP8266 boards (tested with LOLIN D1 R2 board)
- ESP32 boards (tested with ESP32 DEVKITV1 board)

## Requests for modifications / extensions
Please write me a PM including your motivation/problem if you need a modification or an extension.
Expand Down
10 changes: 8 additions & 2 deletions examples/AllPatternOnOneStrip/AllPatternOnOneStrip.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ NeoPatterns bar16 = NeoPatterns(16, PIN_NEOPIXEL_BAR_16, NEO_GRB + NEO_KHZ800, &
#endif

void setup() {
pinMode(LED_BUILTIN, OUTPUT);

#ifdef INFO
Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
8 changes: 6 additions & 2 deletions examples/MatrixDemo/MatrixDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
8 changes: 6 additions & 2 deletions examples/MatrixShowAllColors/MatrixShowAllColors.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
8 changes: 6 additions & 2 deletions examples/NeoPatternsSimpleDemo/NeoPatternsSimpleDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ NeoPatterns bar16 = NeoPatterns(16, PIN_NEOPIXEL_BAR_16, NEO_GRB + NEO_KHZ800, &

void setup() {
Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
8 changes: 6 additions & 2 deletions examples/SnakeAutorun/SnakeAutorun.ino
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
8 changes: 6 additions & 2 deletions examples/SnakeGame/SnakeGame.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ void setup() {
pinMode(TWO_BUTTON_MODE_SELECT_PIN, INPUT_PULLUP);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
8 changes: 6 additions & 2 deletions examples/SnowFlakes/SnowFlakes.ino
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
10 changes: 7 additions & 3 deletions examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@
*/
//#define LED_FEEDBACK_FOR_DEBOUNCE_TEST
#if defined (LED_FEEDBACK_FOR_DEBOUNCE_TEST)
#ifndef BUTTON_TEST_FEEDBACK_LED_PIN
#define BUTTON_TEST_FEEDBACK_LED_PIN LED_BUILTIN // if not specified, use built in led - pin 13 on Uno board
#endif
# if ! defined(BUTTON_TEST_FEEDBACK_LED_PIN)
# if defined (LED_BUILTIN)
# define BUTTON_TEST_FEEDBACK_LED_PIN LED_BUILTIN // if not specified, use built in led - pin 13 on Uno board
# else
# error "LED_FEEDBACK_FOR_DEBOUNCE_TEST defined but no BUTTON_TEST_FEEDBACK_LED_PIN or LED_BUILTIN defined"
# endif
# endif
#endif

//
Expand Down
8 changes: 6 additions & 2 deletions examples/TwoPatternsOnOneStrip/TwoPatternsOnOneStrip.ino
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(115200);
while (!Serial)
; //delay for Leonardo
#if defined(__AVR_ATmega32U4__)
while (!Serial); //delay for Leonardo, but this loops forever for Maple Serial
#endif
#if defined(SERIAL_USB)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));

Expand Down
2 changes: 1 addition & 1 deletion src/NeoPatterns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ NeoPatterns::NeoPatterns(uint16_t aNumberOfPixels, uint8_t aPin, uint8_t aTypeOf
* }
*/
NeoPatterns::NeoPatterns(NeoPixel * aUnderlyingNeoPixelObject, uint16_t aPixelOffset, uint16_t aNumberOfPixels, // @suppress("Class members should be properly initialized")
bool aEnableShowOfUnderlyingPixel,void (*aPatternCompletionCallback)(NeoPatterns*), bool aShowOnlyAtUpdate) :
bool aEnableShowOfUnderlyingPixel, void (*aPatternCompletionCallback)(NeoPatterns*), bool aShowOnlyAtUpdate) :
NeoPixel(aUnderlyingNeoPixelObject, aPixelOffset, aNumberOfPixels, aEnableShowOfUnderlyingPixel) {

OnPatternComplete = aPatternCompletionCallback;
Expand Down

0 comments on commit 8ab2573

Please sign in to comment.