From 72f1190887da2406460adb79063a1b2046a0b066 Mon Sep 17 00:00:00 2001 From: "puneethkumarsn@gmail.com" Date: Tue, 21 Jul 2020 22:05:22 +0530 Subject: [PATCH 1/2] updated code and the pin connection table --- content/electronic-safe/README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/content/electronic-safe/README.md b/content/electronic-safe/README.md index 9b738ca..ba35851 100644 --- a/content/electronic-safe/README.md +++ b/content/electronic-safe/README.md @@ -44,11 +44,12 @@ The code is divided into three modules: | 8 | LCD | D6 | | 7 | LCD | D7 | | 6 | Servo | Signal | -| 5 | Keypad | R4 | -| 4 | Keypad | R3 | -| 3 | Keypad | R2 | -| 2 | Keypad | R1 | -| A3 | Keypad | C4 | -| A2 | Keypad | C3 | -| A1 | Keypad | C2 | -| A0 | Keypad | C1 | +| 5 | Keypad | R1 | +| 4 | Keypad | R2 | +| 3 | Keypad | R3 | +| 2 | Keypad | R4 | +| A3 | Keypad | C1 | +| A2 | Keypad | C2 | +| A1 | Keypad | C3 | +| A0 | Keypad | C4 | + From 9d8a2cc81404457bc4f2106a9f8c52e530af1321 Mon Sep 17 00:00:00 2001 From: puneethkumarsn Date: Wed, 22 Jul 2020 13:26:36 +0530 Subject: [PATCH 2/2] updated code with row numbers --- content/electronic-safe/electronic-safe.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/electronic-safe/electronic-safe.ino b/content/electronic-safe/electronic-safe.ino index b576807..ac5e389 100644 --- a/content/electronic-safe/electronic-safe.ino +++ b/content/electronic-safe/electronic-safe.ino @@ -23,8 +23,8 @@ LiquidCrystal lcd(12, 11, 10, 9, 8, 7); /* Keypad setup */ const byte KEYPAD_ROWS = 4; const byte KEYPAD_COLS = 4; -byte rowPins[KEYPAD_ROWS] = {2, 3, 4, 5}; -byte colPins[KEYPAD_COLS] = {A0, A1, A2, A3}; +byte rowPins[KEYPAD_ROWS] = {5, 4, 3, 2}; +byte colPins[KEYPAD_COLS] = {A3, A2, A1, A0}; char keys[KEYPAD_ROWS][KEYPAD_COLS] = { {'1', '2', '3', 'A'}, {'4', '5', '6', 'B'},