Skip to content

ArunSakthiAnandM/Arduino_UNO_Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Arduino UNO Calculator

A feature-rich scientific calculator implementation for Arduino UNO. This project implements a calculator with basic arithmetic operations, trigonometric functions, and logarithmic calculations using an Arduino UNO microcontroller, LCD display, and a keypad interface.

Features

  • Basic arithmetic operations:

    • Addition (+)
    • Subtraction (-)
    • Multiplication (*)
    • Division (/)
    • Exponentiation (^)
  • Scientific functions:

    • Sine (sin)
    • Cosine (cos)
    • Tangent (tan)
    • Natural logarithm (ln)
  • Additional features:

    • Decimal point support
    • Negative number support
    • Backspace functionality
    • Clear function
    • Shift key for accessing scientific functions
    • Real-time display on LCD

Hardware Requirements

  • Arduino UNO board
  • 16x2 LCD Display (HD44780 compatible)
  • Matrix Keypad (5x4)
  • Connecting wires
  • Power supply

Pin Configuration

LCD Display

  • RS: PB0
  • E: PB1
  • D4: PB2
  • D5: PB3
  • D6: PB4
  • D7: PB5

Keypad

  • Rows: PC0-PC3 (outputs)
  • Columns: PD3-PD7 (inputs with pull-up)

Keypad Layout

| 0 | . | ^ | s | = |
| 1 | 2 | 3 | + | - |
| 4 | 5 | 6 | * | / |
| 7 | 8 | 9 | b | c |

Where:

  • 's' is the shift key for accessing scientific functions
  • 'b' is backspace
  • 'c' is clear

Project Structure

Hardware_Calculator/
├── Calculator Codes/        # Main calculator implementation
│   ├── Keypad.h            # Keypad interface handling
│   ├── LCD.h              # LCD display functions
│   └── main.c             # Main program logic
├── LCD Display Control/    # LCD testing and control
└── Test/                  # Test implementations

Usage Instructions

  1. Power on the calculator

  2. For basic operations:

    • Enter first number
    • Press operation key (+, -, *, /, ^)
    • Enter second number
    • Press = to see result
  3. For scientific functions:

    • Press 's' (shift)
    • Press corresponding number key:
      • 1: sin
      • 2: cos
      • 3: tan
      • 4: ln
    • Enter the value
    • Press = to see result
  4. Additional functions:

    • 'c': Clear display and memory
    • 'b': Backspace (delete last digit)
    • '-' as first input: Negative number

Build Instructions

  1. Clone this repository
  2. Connect the hardware components according to the pin configuration
  3. Compile and upload the code using Arduino IDE or avr-gcc
  4. Refer to the Makefile in each directory for specific build commands

Contributing

Feel free to submit issues and enhancement requests.

Author

ArunSakthiAnandM

About

Source Codes used to build a Hardware Calculator from scratch using Arduino UNO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published