Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* 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: **Keypad Control**
- - Source Code NOT compiled for: Arduino Nano ESP32
- - Source Code created on: 2024-10-05 22:51:17
- ********* 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 *****/
- /****** DEFINITION OF LIBRARIES *****/
- #include <Deneyap_Servo.h> //https://github.com/deneyapkart/deneyap-servo-arduino-library
- #include <Keypad.h> //https://github.com/Chris--A/Keypad
- #include <EasyButton.h> //https://github.com/evert-arias/EasyButton
- #include <LcdKeypad.h> //https://github.com/dniklaus/arduino-display-lcdkeypad
- #include "LcdKeypadAdapter.h"
- #include "ServoControl.h"
- #include "KeypadHandler.h"
- #include "WebServer.h"
- #include "MainControl.h"
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- /***** DEFINITION OF DIGITAL INPUT PINS *****/
- const uint8_t keypad_Keypad3x4_R1_PIN_D4 = 4;
- const uint8_t keypad_Keypad3x4_R2_PIN_D5 = 5;
- const uint8_t keypad_Keypad3x4_R3_PIN_D6 = 6;
- const uint8_t keypad_Keypad3x4_R4_PIN_D7 = 7;
- const uint8_t pinButton_PushButton_PIN_D2 = 2;
- /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
- const uint8_t keypad_Keypad3x4_C1_PIN_D8 = 8;
- const uint8_t keypad_Keypad3x4_C2_PIN_D9 = 9;
- const uint8_t keypad_Keypad3x4_C3_PIN_D10;
- const uint8_t KEYPAD3X4_ROWS = 4; //four rows
- const uint8_t KEYPAD3X4_COLS = 3; //three columns
- char Keys_Keypad3x4[KEYPAD3X4_ROWS][KEYPAD3X4_COLS] = {
- {'1','2','3'},
- {'4','5','6'},
- {'7','8','9'},
- {'*','0','#'},
- };
- /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
- MainControl mainControl; // Instance of MainControl class
- void setup(void)
- {
- // Initialize the main control setup
- mainControl.setup();
- }
- void loop(void)
- {
- // Main control loop
- mainControl.loop();
- }
- /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement