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 | + 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'},