Introduction: Arduino Calculator - Final Project
For this project, I've made a calculator using the Arduino Uno, an LCD screen, and the 4x4 number pad. Although he used click buttons instead of the number pad, the idea for this project along with help with some of the code comes from this lesson from Aleksandar Tomić:
Here are the items you'll need to complete this project:
- Arduino Uno
- 16x2 LCD Module
- 4x4 Membrane Keypad
- Jumper Wires
Both of the libraries can be downloaded in the "Manage Libraries" tab of the Arduino IDE.
Step 1: Connecting the LCD to the Arduino
Here is where we'll connect the LCD to the Arduino. First, connect the LCD to the Breadboard and then connect the pins in the following order:
- Pin 13
- Pin 12
- Pin 11
- Pin 10
- Pin 9
- Pin 8
- Potentiometer (Connect to Ground and Power)
Finally, connect the Ground Rail on the Breadboard to the GND port on the Arduino. Also, connect the Power Rail on the Breadboard to the 5V port on the Arduino.
Step 2: Connecting the Keypad to the Arduino
Now we'll connect the 4x4 Keypad to the Arduino. The Membranous 4x4 Keypad that I used isn't offered in the Fritzing diagram, so I improvised with this 4x4 button pad as a placeholder. The number pad that I used only has 8 ports and I tried to make it as clear as possible for this diagram.
For this step, connect the four pins on the left to ports 2, 3, 4, and 5 on the Arduino.
Now connect the other four pins on the right side of the number pad to ports A5, A4, A3, and A2 on the Arduino.
Step 3: Connecting All of the Components
By this time, you should have a fully functional Arduino based calculator. Now just use the code below to get it working!
Step 4: Number Pad Diagram
This is how I formatted the number pad with the Arduino.
We have a be nice policy.
Please be positive and constructive.