When I compile this code I get a error: 'currentState' was not declared in this scope.
The code:
enum state: int
{
NOTREADY,
WAITSTARTUP,
WAITSECRET,
REVEALSECRET
}
state currentState; <---- Error
const int BUTTONPIN = 4;
const int ROTARYPIN = A0;
void setup()
{
//Open Serial Monitor for debugging purposes
Serial.begin(9600);
//Configure the pins
pinMode(BUTTONPIN, INPUT);
pinMode(ROTARYPIN, INPUT);
//Initialise the LCD
lcd.begin(16, 2);
//Assume that the current state is wait for start up signal
currentState=WAITSTARTUP;
}