The Robotic Calculator project controls a robotic arm to simulate a calculator by physically pressing buttons to perform mathematical operations. Users input numbers and operators through the Serial Monitor, and the Braccio Robot executes the calculations by pressing the corresponding buttons on a calculator interface.
- User input via Serial Monitor for two 1- or 2-digit integers and basic math operations
- Automated robotic arm control for precise button pressing
- Support for addition, subtraction, multiplication, and integer division
- Safe movement patterns to prevent system damage
- Real-time calculation and result display
- Braccio Robot with servo motors
- Arduino Uno or compatible microcontroller
- USB cable for Arduino connection
- Arduino IDE
- Required Libraries:
- BraccioRobot
- Servo
- Locate your Arduino libraries folder:
- Windows:
Documents/Arduino/libraries/
- macOS:
Documents/Arduino/libraries/
- Linux:
~/Arduino/libraries/
- Windows:
- Create the
libraries
folder if it doesn't exist - Download and extract the
BraccioRobot
andServo
libraries to this folder
- Connect the Braccio Robot to Arduino Uno following the pin configuration
- Mount the robot on a stable surface with adequate movement space
- Verify all servo connections
- Open Arduino IDE
- Load the project code
- Configure settings:
- Set baud rate to 9600
- Select correct board and port
- Upload code to Arduino
- Open Serial Monitor (baud rate: 9600)
- Follow the prompts:
- Enter first number (1-2 digits)
- Choose operation (+, -, *, /)
- Enter second number (1-2 digits)
- Watch as the robot executes the calculation
Input: 23 + 85
Robot Actions:
1. Press "2", "3"
2. Press "+"
3. Press "8", "5"
4. Press "="
Result: Robot presses "1", "0", "8"
-
Robot Not Moving:
- Check servo connections
- Verify power supply
- Confirm servo calibration
-
Input Rejected:
- Ensure numbers are 1-2 digits
- Verify valid operator (+, -, *, /)
- Check Serial Monitor baud rate
-
Incorrect Button Presses:
- Review position coordinates in
operation()
function - Calibrate servo positions
- Check for mechanical obstructions
- Review position coordinates in
getValidInput()
: Validates numeric inputgetOperationInput()
: Handles operator selectionperformCalculation()
: Executes arithmetic operationsoperation()
: Controls robot movement and button pressing
- Input validation for numbers and operations
- Safe movement protocols
- Division by zero protection
For detailed system design, implementation details, and analysis, refer to the project report (PDF) in the repository.
This project is licensed under the MIT License - see LICENSE.md for details.