adafruit / Adafruit_CircuitPlayground

library for Circuit Playground board
171 stars 77 forks source link

Combadge example only plays once for CP Classic (AVR) #28

Closed caternuson closed 5 years ago

caternuson commented 6 years ago

This line added a pin config change to end(): https://github.com/adafruit/Adafruit_CircuitPlayground/blob/master/utility/Adafruit_CPlay_Speaker.cpp#L41 and nothing in the loop() of the combadge example turns it back to output.

Example sketch can be fixed by adding a call to .speaker.begin() in the loop(), but not sure if this behavior change was intended for the library.

caternuson commented 6 years ago

Looks like it was some of the refactoring from begin() to playSound() here: https://github.com/adafruit/Adafruit_CircuitPlayground/blob/master/utility/Adafruit_CPlay_Speaker.cpp#L74 That used to just call begin() which would set the pin back to output.

PaintYourDragon commented 5 years ago

Fixed now (1.8.2 or later), thanks for spotting this.