LCD keypad shield + TMRpcm library, both use the pin 9 (arduino UNO)

Happy new year everyone,

in the TMRpcm library speakerPin is = 9 for Arduino UNO, but in the LCD keypad shield that pin is used as an enable pin.

Audio files are wav 8-bit, 16kHz sample rate

How can I fix the problem?

I didn't look into the source code, but I think that TMRpcm uses the internal hardware TIMER1, and pin 9 is fixed for the output of TIMER1. So use pin 9 for TMRpcm.

Which LCD keypad shield is it ? I think the best way is to change the LCD shield. Remove the copper trace to pin 9 and solder the enable to an other pin. Change the library to use that other pin for enable.

Thank You, Peter_n

I did that, I mounted the shield on a pcb, pin 9 audiopin, pin 3, enable. But there are some other incompatibility between the SD library. LCD keypad shield and TMRpcm library. Now I use the SDfat library with TMRpcm library + LCD shield, and I have no problems.