Home All Projects
Easy

Keypad membrane for Calculator

You'll press numbers and symbols on a keypad, and the LCD will display the equation and result — like a basic calculator , By using Arduino and I2C LCD display

Keypad membrane for Calculator
5,762 views
3 likes

Components, Tools and Machines

4x male to female jumper wires
🛒 Buy Now
1x Arudino Uno Rev3
🛒 Buy Now
1x Breadboard, 830 Tie Points
🛒 Buy Now
1x Membrane Keypad
🛒 Buy Now
1x I2C LCD display
🛒 Buy Now
8x Male/Male Jumper Wires
🛒 Buy Now

Apps and platforms

1x Arduino IDE
Official Site

Project description

LCD connected to Arduino PIN

GND - GND

VCC - 5V

SDA - A4

SCL - A5

Keypad connected to Arduino PIN

1 (Row1) - 9

2 (R2) - 8

3 (R3) - 7

4 (R4) - 6

5 (Column1) - 5

6 (C2) - 4

7 (C3) - 3

8 (C4) - 2

For Better understanding

********Be Careful*******

  1. In Keypad Letter 'A' must be Addition or ' + '
    1. In Keypad Letter 'B' must be Substraction or ' - '
      1. In Keypad Letter 'C' must be Multiplication or ' x '
        1. In Keypad Letter 'D' must be Division or ' / '
          1. In Keypad Symbol '#' must be Equal sign or ' = '
          2. In Keypad Symbol '*' must be Clear sign or ' C '

How its works

🧾Overview

This project turns your Arduino into a basic calculator. You enter math expressions like `3+4*2`, and it shows the result on a small screen (LCD). It also correctly follows math rules — doing multiplication/division before addition/subtraction.

🧠 Step-by-Step Explanation

1. You Press Keys on the Keypad

- Each key you press (like `2`, `+`, `3`, etc.) gets added to an equation string.

- The screen (LCD) shows what you’re typing, just like a real calculator.

2. Expression Is Stored as Text

- The Arduino collects all the numbers and symbols you entered in order.

- For example, if you type `2+3*4`, it saves that whole string.

3. When You Press `=`

- The Arduino reads the entire string.

- It first looks for multiplication (`*`) or division (`/`), and calculates those first.

- So, `3*4` becomes `12`.

- Then it adds or subtracts the remaining parts, like `2+12`.

4. It Shows the Final Answer

- The result is shown on the second line of the LCD.

- If you type an invalid expression (like division by zero), it shows `0` for safety.

5. Press `*` to Clear

- You can start over by pressing the `C` key to reset the calculator.

🧾 In Summary:

This project is a **real calculator** built from simple parts. It works by:

- Reading button inputs

- Storing a full math equation

- Evaluating it correctly using math rules

- Showing the answer on the screen

Code

🔒 Unlock Code

Support to get the Source Code for this project

Project Reference Code: keypad-membrane-for-calculator-484e01-en
1120 THB
PromptPay QR Code

ประเมินราคาอัตโนมัติ + Reference Code

อยากได้งานคล้ายโปรเจคนี้ ให้ AI ประเมินราคาก่อน

กรอกข้อมูลให้ครบ ระบบจะสร้างรหัสอ้างอิงและประเมินราคา/ระยะเวลาคร่าว ๆ จากรายละเอียดงาน แล้วให้กด Add LINE พร้อมพิมพ์รหัสนี้เพื่อคุยต่อ

คำถามให้ AI ประเมินแม่นขึ้น

หลังส่งฟอร์ม ระบบจะโชว์ Reference Code ให้ copy แล้วกด Add LINE เพื่อคุยต่อ ข้อมูลส่วนตัวจะไม่ถูกส่งเข้า GA4

รีวิวจากคนใช้งานจริง

รีวิวจากลูกค้าและคนที่เคยใช้งาน

ถ้าเคยสั่งงาน เคยอ่านหน้านี้แล้วได้ประโยชน์ หรือมีข้อเสนอแนะ ฝากรีวิวไว้ได้เลย

กำลังโหลดรีวิว...