Renaming pins in sketch I'm trying to rename pins so that they post as some kind of alpha-numeric combination in a database.  For example, if I define the following....

#define APLHA 0
#define BRAVO 2
#define CHARLIE 5
#define DELTA 6


...I would like to rename the output of the pins, as recorded in the db, as something other than 0, 2, 5, and 6 (or whatever pin is used). Let's say A, B,C, and D for the purposes of this exercise.

Is this just as simple as creating if() function that is called upon prior to posting to the db (ex. if 0 then A, if 2, then B, etc)?  I feel like there must be a better, dare I say more elegant(?), way of doing this?

Current output:
PIN | VALUE
0  |   1
 2  |   1
 5  |   0
 6  |   0

Desired:
PIN | VALUE
 A  |   1
 B  |   1
 C  |   0
 D  |   0
If I understood your question correctly, you're looking for something like this:  

static const byte PIN_NUMBER[4] = { 0, 2, 5, 6 };
static const char *PIN_NAME[4] = { "A", "B", "C", "D" };

// and use them like this:

void Log(byte index)
{
  byte val = digitalRead(PIN_NUMBER[index]);
  Serial.print(PIN_NAME[index]);
  Serial.print('|');
  Serial.println(val);
}

void setup()
{
  for (byte i = 0; i &lt; 4; ++i) pinMode(PIN_NUMBER[i], INPUT);
}

void loop()
{
  Serial.println("PIN|VALUE");
  for (byte i = 0; i &lt; 4; ++i) Log(i);
  delay(1000);
}


Also, in the special case of "A", "B", "C", "D" as pin names, you don't really need the PIN_NAME array, instead of  

Serial.print(PIN_NAME[index]);


you can use:  

Serial.print('A' + index);