hi
i need to get 3 values from user and save them to use when i need them
here is a part of my code:
void loop()
{
char customKey = kpd.getKey ();
if ( customKey ){
Lcd.print(customKey);
}
String first = String(customKey);
if(first == "A" ){
Lcd.clear();
Lcd.setCursor(0,0);
Lcd.print("Enter length");
Lcd.setCursor(0,1);
Lcd.print("length:");
"L"==customKey;
}
String second = String(customKey);
if(second == "B" ){
Lcd.clear();
Lcd.setCursor(0,0);
Lcd.print("Enter width");
Lcd.setCursor(0,1);
Lcd.print("width:");
"W"==customKey;
here i need to save L and W but the problem is customkey is keep Changing and in this code w is equal to L and it shouldn't be!
i want to get the first number from user, save it in L then get the next one
what should i do?
Then, it would make sense to save the value in customKey ONLY when there IS a value in customKey. You already check that there IS a value in customKey, and take some action if there is. Then, you (stupidly) try to save the value even if there is no value. Why would you do that?