does anyone have any ideas on how to make THIS shorter and more streamlined?
Put the sledgehammer back in the tool bag and try this idea
void setup()
{
Serial.begin(115200);
for (int testPin = 14 ; testPin < 70; testPin++)
{
int aNum = translatePins(testPin);
if (aNum != -1)
{
Serial.print(testPin);
Serial.print("\tA");
Serial.println(aNum);
}
}
}
void loop()
{
}
int translatePins(int pinNum)
{
for (int pin = 14 ; pin < 20; pin++)
{
if (pinNum == pin)
{
return pin - 14;
}
}
for (int pin = 54 ; pin < 70; pin++)
{
if (pinNum == pin)
{
return pin - 54;
}
}
return -1;
}
There are further improvements that could be made but it may give you some ideas.
Mind you, I still don't really see the need for it