From faff109c85db3ca3cffb67aa81d49cba2f654577 Mon Sep 17 00:00:00 2001 From: ladyada Date: Mon, 7 Nov 2016 18:52:56 -0500 Subject: [PATCH] fix for CircuitPlayground --- Adafruit_CircuitPlayground.cpp | 6 +++++- library.properties | 2 +- utility/Adafruit_CPlay_NeoPixel.cpp | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Adafruit_CircuitPlayground.cpp b/Adafruit_CircuitPlayground.cpp index 1c01c92..b065578 100644 --- a/Adafruit_CircuitPlayground.cpp +++ b/Adafruit_CircuitPlayground.cpp @@ -9,7 +9,11 @@ boolean Adafruit_CircuitPlayground::begin(uint8_t brightness) { pinMode(CPLAY_BUZZER, OUTPUT); pinMode(CPLAY_CAPSENSE_SHARED, OUTPUT); - strip = Adafruit_CPlay_NeoPixel(10, CPLAY_NEOPIXELPIN, NEO_GRB + NEO_KHZ800); + strip = Adafruit_CPlay_NeoPixel(); + strip.updateType(NEO_GRB + NEO_KHZ800); + strip.updateLength(10); + strip.setPin(CPLAY_NEOPIXELPIN); + lis = Adafruit_CPlay_LIS3DH(CPLAY_LIS3DH_CS); mic = Adafruit_CPlay_Mic(); diff --git a/library.properties b/library.properties index 12b9ad8..482e461 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit Circuit Playground -version=1.6.3 +version=1.6.4 author=Adafruit maintainer=Adafruit sentence=All in one library to control Adafruit's Circuit Playground board. diff --git a/utility/Adafruit_CPlay_NeoPixel.cpp b/utility/Adafruit_CPlay_NeoPixel.cpp index 693076f..55c6b4e 100644 --- a/utility/Adafruit_CPlay_NeoPixel.cpp +++ b/utility/Adafruit_CPlay_NeoPixel.cpp @@ -60,6 +60,7 @@ Adafruit_CPlay_NeoPixel::Adafruit_CPlay_NeoPixel() : Adafruit_CPlay_NeoPixel::~Adafruit_CPlay_NeoPixel() { if(pixels) free(pixels); if(pin >= 0) pinMode(pin, INPUT); + pixels = NULL; } void Adafruit_CPlay_NeoPixel::begin(void) {