I am new to arduino and c language, however i have programmed in c++.
i am doing a senior project on the game mastermind which is a code breaking game. I need to figure out how to wait for a key to be pressed in a for loop to create a value in an array. I came across the waitForKey() function but do not know how to use it. Here is the section of code i need help with.
for (i = 0; i < 4; i++)
_ usercode = charchoice -‘0’;_
if (usercode != 1 && usercode != 2 && usercode != 3 && usercode != 4 && usercode != 5 && usercode != 6)
lcd.print(“Enter # from 1-6”);
usercharcode = customKeypad.getKey();
usercode = usercharcode - ‘0’;
*I Get an error message that says *
exit status 1
‘class Keypad’ has no member named ‘waitforkey’
yet this is straight from the arduino website.