0

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

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.

10
  • So does that mean it's basically impossible?
    – Epicmania
    Dec 23 '20 at 20:52
  • Not impossible, just a lot of work, and the results won't be as fast as with hardware SPI.
    – Majenko
    Dec 23 '20 at 20:53
  • Oh :(. Is there no way to edit the PCM library to use another pin? What makes pin 11 so special?
    – Epicmania
    Dec 23 '20 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
    Dec 23 '20 at 20:55
  • 1
    I 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
    Dec 23 '20 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.