/********* Pleasedontcode.com **********
Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- Terms and Conditions:
You have a non-exclusive, revocable, worldwide, royalty-free license
for personal and commercial use. Attribution is optional; modifications
are allowed, but you're responsible for code maintenance. We're not
liable for any loss or damage. For full terms,
please visit pleasedontcode.com/termsandconditions.
- Project: **Title:** Lock System
- Source Code NOT compiled for: Arduino Nano ESP32
- Source Code created on: 2024-10-05 14:39:18
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* The servo motor installed in the door will lock or */
/* unlock based on the correct PIN code received by */
/* the button. If the door is unlocked and the PIN is */
/* correct, it will lock. If the door is locked and */
/* the PIN is correct, it will unlock. */
/****** SYSTEM REQUIREMENT 2 *****/
/* The webserver provides a web page about lock or */
/* unlock state of the door. */
/****** END SYSTEM REQUIREMENTS *****/
/********* User code review feedback **********
#### Feedback 1 ####
- code too long. split in on addition files.
********* User code review feedback **********/
/****** DEFINITION OF LIBRARIES *****/
#include "DoorLock.h"
#include "KeypadConfig.h"
/***** DEFINITION OF PINS AND VARIABLES *****/
const uint8_t BUTTON_PIN = 2;
DoorLock doorLock(9, BUTTON_PIN); // Create a DoorLock object with the servo attached to pin 9
void setup(void) {
doorLock.setup(); // Call the setup method of DoorLock
}
void loop(void) {
doorLock.loop(); // Call the loop method of DoorLock
}