The PCM library uses pin 11 and the NRF24L01 also uses pin 11. I am using an Arduino nano, and don't know if there is any way to change the pins of either the speaker or the transceiver. https://github.com/damellis/PCM
1 Answer 1
No, you can't just change pins. Both systems use hardware that is specific to pin 11.
The best you could achieve would be to use a software SPI implementation on other pins to drive the nRF24L01, but that would mean changes to the library you are using to remove the SPI library usage and replace it with your own software SPI implementation.
-
So does that mean it's basically impossible?Epicmania– Epicmania12/23/2020 20:52:37Commented Dec 23, 2020 at 20:52
-
Not impossible, just a lot of work, and the results won't be as fast as with hardware SPI.Majenko– Majenko12/23/2020 20:53:30Commented Dec 23, 2020 at 20:53
-
Oh :(. Is there no way to edit the PCM library to use another pin? What makes pin 11 so special?Epicmania– Epicmania12/23/2020 20:54:48Commented Dec 23, 2020 at 20:54
-
It's hard-wired to a specific timer to generate the PWM signal. You could re-write the PCM library to use different timers and their associated pins, but that would be more work and much harder to understand.Majenko– Majenko12/23/2020 20:55:52Commented Dec 23, 2020 at 20:55
-
1I might be wrong, but didn't pin 11 in the PCM library have also been pin 3? So could it be changed to that?Epicmania– Epicmania12/23/2020 20:58:14Commented Dec 23, 2020 at 20:58