I have an ESP32 Wrover module with an ILI9341 QVGA Color TFT LCD Display with touch screen (the whole board was purchased from HackerBox, Specifically HackerBox50). I have setup a program that has a main menu of options and one of the options opens a Keypad function that requires a passkey to enter. when Prompted loop() calls the Canary_Setup() function, which will call the touchscreen calibration file and draw keypad() function. the keypad works fine and will send the entered passcode to the serial monitor but for some reason it won't trigger the if statement regardless of the passcode entered. the variable "numberBuffer" of type char is where the passcode is stored. when I check the Len of "numberBuffer it returns with the correct length yet it doesn't register properly in the if statement.
Variable declaration:
char numberBuffer[NUM_LEN + 1] = "";
If statement:
if (b == 2) {
status("Sent value to serial port");
Serial.print(numberBuffer);
if (numberBuffer == "2991") {
Serial.println("hello");
menu_return();
break;
} else {
Serial.println("wrong");
}
All other aspects of the code work without fault any ideas on what the problem could be; I am somewhat new to the Arduino/Hardware world so sorry if my code isn't clean.