Sporech:
Why are you using an analog pin for output rather than digital pin? You are using digitalWrite() on an analogue pin. Try using pins 1 2 and 3 instead.
Pin 1 is used by hardware serial. Not a good idea. There is nothing wrong with using an analog pin for digital output. I do it any time it's convenient for me.
Sporech:
Why are you using an analog pin for output rather than digital pin? You are using digitalWrite() on an analogue pin. Try using pins 1 2 and 3 instead.
There is nothing wrong with using digitalWrite() on analogue pins as long as the pinMode is set correctly. As for using digital pin 1, that is not generally a good habit to get into as it is used by hardware Serial.
As to the code itself, the first obvious comment would be the use of ints instead of bytes, not making these variables const and not using meaningful names for them
int controlPin1 = A1; //constants for Control Pin 1
int controlPin2 = A2; //constants for Control Pin 2
int controlPin3 = A3; //constants for Control Pin 3
As mentioned above, do not use pins 0 or 1 unless you know what you are doing
LiquidCrystal lcd(13, 12, 3, 2, 1, 0);
You are trying to use the LCD before setting it up
DisplayChoicesScreen(); //display main screen
lcd.begin(16, 2); // initialize the lcd
int l;
Not a good choice for a variable name
if (currentState == 2) {
if (int(key) != 0) {
if (key == '*') {
CurrentChoiceValue[0] = '0';
ShowCanceledChoice;
DisplayChoicesScreen();
currentState = 1;
You already know that (int)key is not zero and you have dealt with the case where key is '*' so will this code ever be executed ? This block of code is within the switch/case. Will any of it be executed ?
}
}
}
}
}
}
This is not necessarily wrong but usually indicates that the code could be restructured to make it more readable.