Introduction:

The project involves building an arduino calculator. The goal I sought in implementing the calculator was to comprehend how a calculator is constructed. Even if we can currently perform calculations using our phones, there may come a day when we also need a pocket calculator. For this reason, I built my own calculator using an Arduino board.

General Description :

Calculator powered by a 9V battery allows it to be transported without adding extra strain. It can do operations like add, subtract, multiply, divide by two, and calculate the sum of two numbers. We will use the tastaturi to introduce values, and the outcome may be seen on an LCD screen.

Hardware Design :

Components :

Arduino UNO LCD screen with I2C interface 4×4 keyboard 9V battery 9V battery plug + connector Cables

I used an Arduino payload to do mathematical operations and to interface with the keyboard and LCD screen. Thus, I've connected an LCD screen with an I2C interface to the Arduino board. The LCD display is used to display messages, inputted numbers, and calculated results. The keyboard is used to introduce numerical values and arithmetic operations. After I entered the code on the Arduino shield, I retained it using volatile memory. I connected a 9V battery to the Arduino board using a battery connector and a mufa so that I could use the calculator without a laptop. The user will enter two numeric values and choose the mathematical operation they wish to perform. Once the user presses the button, arduino uno will calculate the result and display it on the lcd screen.

Software design :

Development tool: Arduino IDE 1.8.19 For connecting the LCD screen, I used the libraries Wire.h and hd44780.h (which is a derivative of the LiquidCrystal I2C libraries), while for connecting the keyboard, I used the library Keypad.h. Algorithm implemented: implemented algorithms and structures can be found in an archive.

Implemented features: The software includes a crucial function called domath() that makes use of the switch expression to determine the appropriate mathematical operation to do depending on the user-pressed button. Function is called later in the loop function, which also contains the code for entering numbers, clearing the screen, and preparing for the next calculation.

Conclusion :

This project gave me the chance to better understand fundamental software and hardware concepts. The fact that I could use a variety of components was helpful in figuring out how they related to one another and how they worked. The majority of the issues were related to connecting the LCD screen. The screen appears at the beginning, but we are unable to read any messages from it. This issue was resolved by adjusting the contrast using the power meter that is located underneath the module. Additionally, since I2C was the interface I used, I had to use a program to scan the I2C device I was using in order to obtain its address. With all of them, I was able to complete the project with a functional algebraic calculator.

Download:negrea_dragos-mihai.rar

Software bibliography:

Arithmetic calculator

Arduino calculator

Tinkercad

pm/prj2023/avaduva/arithmetic_calculator.txt · Last modified: 2023/05/30 14:51 by dragos_mihai.negrea
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0