(Posting for the First time on the Forum, so don't get mad at me . If there's a mistake, please let me know).
Hey Guys! I'm Somewhat new to programming and had started using Arduino IDE around 3-4 Months Ago.
I learned the Basics through Arduino Reference Pages, Forum, Google, Youtube, Etc.....
I was able to write the Following Code by myself (99%). First i will post the Full code, then the part of the code which have the issues. (Issues at the Bottom)
Parts Used:
- Arduino Mega 2560
- MFRC 522 RFID Module 13.56 Mhz
- 4x4 Keypad
- LCD 16x2
- Red & Green Leds
- 100E Resistor (Common for Leds)
- Push Button with 1K Pull down Resistor
- Simple Buzzer
- Single Channel Relay module (you might find some lines in the code where the relay is pulled LOW rather than HIGH, this is
becuase my relay module is Active-low) - EM Door Lock
I don't have a schematic for this as i made it myself so.. sorry! But it's easy to figure out the pins through the codes.
You can take a look at the MFRC522 Example sketches for it's Pinout and connection with the Mega.
The Basic Features like Keypad Unlock and RFID Unlock work Perfectly Fine but the Additional Features to Change Password & Programming Password Do not Work (Take a Look at the Code):
I can not paste the code here becuase it exceeds the character limit. Download the Ino files and open it up in your IDE.
The FULL CODE:
You will need to download it all, it Exceeds the Character Limit.
PARTS Of The CODE Where The PROBLEM Really Is:
PART 1: (The Access password and Programming password Changing Part)
So the Problem is that when i enter the programming mode and after successfully entering the programming code, when i try to choose what i want to edit (whether i want to change the Access code or the programming code). It just doesn't go any further.
It just Stops at the Selection Screen.
PART 2: (The Deactivation Part):
Here the Problem is that as soon as i Enter this mode to Deactivate the System, the LCD starts Flickering and after i successfully enter the password and deactivate the system the (ACTIVE == false) statement saying System Deactivated shows up for just a milli second or so and the display goes empty (Though the backlight stays on). But the Command works and it does turns off the Lock. After i Press the "A" button again to Activate the system, the System Activates and the Display comes Back On. (I think i might have chosen the wrong pins for the LCD).
An Additional Problem with my LCD is whenever the Relay turns on the Display Goes Dim (Not the Backlight but the Characters).
Thanks for Reading such a long long post, Hoping for a positive reply.
PART_1.ino (5.71 KB)
PART_2.ino (2.41 KB)
THE_FULL_CODE.ino (14.6 KB)
All INO Files.zip (4.69 KB)