Skip to content

Repository files navigation

This is the repository for all my Arduino simulation and hardware projects

A tactile arithmetic experience powered by ATmega328P

Arduino C++ Status

A simple, robust calculator that handles the basics without the distraction of an OS.

🧐 Why I Built This

I wanted to understand the raw logic behind input processing. Instead of using a phone calculator, I built one from scratch to learn about matrix scanning, state management, and LCD driver communication.

⚡ Features

  • Arithmetic Core: Handles Addition, Subtraction, Multiplication, and Division.
  • Continuous Calculation: Chain operations (e.g., 5 + 5 then + 2 uses the previous result).
  • Error Handling: Catches division by zero errors.
  • Reset on Demand: Dedicated C button to wipe the memory.

🔌 Pinout & Wiring

The code uses specific pin mappings. If you are using an Arduino Uno, note that Pins 14-17 correspond to Analog Pins A0-A3.

Component Component Pin Arduino Pin Notes
LCD Display RS D12
E (Enable) D11
D4 D10
D5 D9
D6 D8
D7 D7
Keypad Row 1 - 4 D2, D3, D4, D5
Col 1 A3 (D17) Leftmost column
Col 2 A2 (D16)
Col 3 A1 (D15)
Col 4 A0 (D14) Rightmost column

🛠️ How to Run

  1. Clone this repository.
  2. Open calculator.ino in the Arduino IDE.
  3. Install the required libraries via Library Manager (Ctrl+Shift+I):
    • Keypad by Mark Stanley
    • LiquidCrystal (Built-in)
  4. Connect your Arduino and hit Upload.

🎮 Controls

Key Function
0-9 Enter Numbers
A + (Add)
B - (Subtract)
C × (Multiply)
D ÷ (Divide)
# = (Result)
* Clear (Reset)

Found this useful? ⭐ Give this repo a Star!

Developed with ❤️ by Shoumik Islam AKA Base21rizz

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages