This week, was very enjoyable as we delved deeper into learning how to use components and sensors with Arduino. It was a week full of excitement and challenges.
My mini KASIO Calculator
After researching on Google and Instructables, the project that caught my attention was a calculator, so I decided to create it.
FOR Simulation Circuit
To simulate the circuit and ensure it works with the correct connections.
Electronics Tools
Breadboard
Buzzer
Jumpers Wires
crocodiles Wires
On/ Off Switch
KeyPad
Arduino Uno
LCD
Crafting Tools
Cutter
Cardboard
Ruler
Tape
Design Circuit on TinkerCad
Circuit Inputs:
On/Off Switch
Keypad
Circuit Actions:
Sound (via Buzzer)
LCD Display
Steps Taken:
Connected the On/Off switch to Arduino .
Connected the 4x4 Keypad for number and operator input.
Attached the LCD display to show the calculation results.
Connected a buzzer to sound upon pressing the button or completing a calculation.
Wired the circuit in parallel to ensure stable power distribution.
Code Development on Arduino IDE
Steps Taken:
This Arduino code implements a simple calculator using a 16x2 LCD display, a 4x4 keypad, a buzzer, and a switch. Here's a brief explanation of how it works:
Hardware Initialization:
The LCD is initialized to display messages(I Used GPT )
The buzzer is set up for audio feedback.
The switch (connected to A0) must be turned ON to start the calculator.
User Input via Keypad:
Numbers are entered and displayed on the LCD.
The first number (num1) is stored until an operator (+ , - , * , /) is pressed.
The second number (num2) is stored after the operator.
Performing the Calculation:
The corresponding arithmetic operation is performed when the "=" key is pressed.
The result is displayed on the LCD.
A buzzer sound is triggered to indicate the result is ready.
Reset Functionality:
Pressing "C" clears the LCD and resets all values.
Build Circuit on Breadbord
Cardboard
I cut the cardboard to a suitable size, then measured the LCD and switch and made cutouts for them.
Title of Media
I connected the LCD using a 16-pin connection, because I used GPT to wire and coding LCD. With the additional wiring for the keypad, the setup required many connections, occupying all the digital pins on the Arduino. For on/off switch and buzzer I connected Them to the analog pins, configuring them as digital inputs/outputs in the code.
Title of Media