Password Door Lock Using Tinkercad
#include <Servo.h> #include <LiquidCrystal_I2C.h> #include <Keypad.h> #ifndef PASSWORD_H #define PASSWORD_H #define MAX_PASSWORD_LENGTH (20) #define STRING_TERMINATOR '\0' class Password { public: /** * @brief Construct object in memory, set all variables * * @param pass */ Password(char* pass); /** * @brief Set the password * * @param pass */ void set(char* pass); /** * @brief Evaluate a string, is it equal to the password? * * @param pass * @return true * @return false */ bool is(char* pass); /** * @brief Append a char to the guessed password * * @param character * @return true * @return false */ bool append(char character); /** * @brief Reset the guessed password, one can guess again * */ void reset(); /** * @brief Is the current guessed password equal to the target password? * * @return true * @return false */ bool evaluate();