nRF24L01 use of RF24 libary with analog pin as CE CS pins

Hi all,

I'm planning to use nRF24L01-transmitters together with a SD-Card on an arduino mega. Both will use the SPI interface, so I'll need to toggle the CS pin(s). I will use the RF24 libary and I don't want to change the source code of it ().

Because of other limitations on my self-made-shield I have to use the analog pins of the Mega to control the chip-select and chip-enable functions. Its written here that I can "use any available pins": https://tmrh20.github.io/RF24/Arduino.html

My question now: Is that also true for analog pins? Can I just use the number of the analog pins (55,56...) of the mega for it?

Something like:

RF24 radio(56,57)

Thanks a lot in advance and all the best Tim

Is that also true for analog pins?

Some pins on the Mega (and other Arduinos) provide analog capabilities. ALL pins on the Mega (and other Arduinos) provide digital capabilities.

Can I just use the number of the analog pins (55,56...) of the mega for it?

My Mega only has 54 pins. Can you post a link to yours that has 55+ pins?

Can you post a link to yours that has 55+ pins?

I think they are counting up the analog pins after the digital ones: https://www.arduino.cc/en/Hacking/PinMapping2560

The Arduino team provided some names, A0, A1, A2, etc. for the analog pins when the are being used as digital pins. The name corresponds to the label on the board, with an A in front. So, A0 is analog pin 0 used as a digital pin. The actual value of A0 depends on the Arduino.

Sorry for the confusion, but this was not my question.

My question was about the use of the RF24 lib:

Can I use the analog pins for ChipSelect & ChipEnable in the RF24 libary? The constructer takes only int values, so can I simply use the pin numbers of the analog pins (not the A0, A1,...). Something like:

RF24 radio(56,57)

Does anybody has experience with that?

The correct pin numbers match the A0, A1, etc equates. (I would use Ax).

Yes, answer #1 implies it will work on a Mega.