| This is the repository for all my Arduino simulation and hardware projects |
|
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.
- Arithmetic Core: Handles Addition, Subtraction, Multiplication, and Division.
- Continuous Calculation: Chain operations (e.g.,
5 + 5then+ 2uses the previous result). - Error Handling: Catches division by zero errors.
- Reset on Demand: Dedicated
Cbutton to wipe the memory.
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 |
- Clone this repository.
- Open
calculator.inoin the Arduino IDE. - Install the required libraries via Library Manager (
Ctrl+Shift+I):Keypadby Mark StanleyLiquidCrystal(Built-in)
- Connect your Arduino and hit Upload.
| 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

