Aliasing pins? Need surrogate for busted pin.

Hi!

I have busted my pin 13 and it is now stuck at 3v. I am developing a big open source project using the Arduino DUE which interfaces with a certain shield. Is there any way I can alias pin 13 in my Arduino code to another (not broken pin)?

This way I can fix my setup just by hardwiring this 'aliased to' pin to take pin 13s place, and not have to change anything in my code. Also when I push my changes to the world all of the code regarding pin 13 is unchanged.

I realize that I could just vim grep every pin13 instance and change it back and forth when I want to push, but having some section of code to just comment/uncomment (or however this alias operation might be implemented) would be very nice.

Thanks in advance!

Hello and welcome :slight_smile:

Why not just use a constant or define ?

const uint8_t myPin = 12;