The L2L1 project is a sophisticated software and hardware platform for controlling a robotic hand through a Python-based graphical interface. It supports multiple interaction modes—voice commands, educational games, and custom finger movements—while ensuring robust communication with an Arduino microcontroller that actuates the hand’s servomotors.
The platform is designed for educational, research, and demonstration purposes, providing a modular and extensible foundation for human-robot interaction.
- Educational Engagement: Provide interactive games and activities to teach binary counting, sign language, and classic games like Rock-Paper-Scissors using the robotic hand.
- Accessibility: Enable intuitive control via both graphical and voice interfaces, making the system approachable for users of varying technical backgrounds.
- Customization: Allow users to define and execute personalized hand gestures, supporting experimentation and creative applications.
- Robust Communication: Ensure reliable, asynchronous communication between the Python application and the Arduino hardware, with clear feedback and error handling.
- Frameworks:
customtkinter,tkinter,PIL.Image - Structure: Modular GUI with distinct frames for each major function (main menu, games, voice control, custom movements).
- Navigation: Managed by the
Mediatorclass, orchestrating transitions and maintaining application state. - Visual Feedback: Uses icons, color cues, and status bars to inform the user of system state and errors.
- Library:
speech_recognition - Functionality: Users issue natural language commands to control the hand or launch games. The system provides real-time feedback and error handling.
- Integration: Voice commands are parsed and translated into movement instructions or navigation actions.
- Error Handling: Notifies the user if speech is not recognized or if a command is invalid.
- Location:
/Game/directory - Implemented Games:
- Rock-Paper-Scissors (
GamePPC.py): The robotic hand plays against the user, with random or user-selected gestures. The game logic ensures fair play and provides visual feedback on the outcome. - Binary Counting (
CountBinary.py): The hand displays numbers in binary using finger positions, reinforcing binary concepts visually and interactively. - Sign Language (
SignLanguage.py): The hand spells out words or phrases in sign language, supporting educational and accessibility goals.
- Rock-Paper-Scissors (
- File:
PersonalizedMovement.py - Purpose: Users manually specify finger positions to create and execute custom gestures. The interface allows saving, editing, and replaying custom movements.
- File:
Movement.py - Role: Centralizes logic for generating and validating movement commands, ensuring consistency across all input methods. Handles edge cases and prevents invalid or unsafe movements.
- File:
ServoMediator.py - Mechanism: File-based communication (
send_command.txt,executed_command.txt) and multi-threading for asynchronous command exchange. - Error Handling: Provides user feedback on connection status and command execution. Detects and reports communication failures or hardware issues.
- File:
ServoMotor.ino - Function: Receives JSON-formatted commands, interprets them, and actuates servomotors accordingly.
- Libraries: Uses
ArduinoJsonandServo.h. - Safety: Includes checks to prevent servo overextension and ensures smooth transitions between gestures.
- Multi-modal Control: Seamless switching between GUI, voice, and game-based control.
- Educational Tools: Interactive modules for learning binary, sign language, and logic games.
- User Feedback: Real-time status updates, error messages, and visual cues.
- Extensibility: Modular codebase for easy addition of new features, games, or gesture libraries.
- Threaded Communication: Responsive GUI during hardware interactions.
- Cross-platform Support: Designed to run on Windows and Linux (Debian-based) systems.
/__internal/
│
├── Main.py
├── Mediator.py
├── CommandeVocale.py
├── PersonalizedMovement.py
├── Movement.py
├── ServoMediator.py
├── /Game/
│ ├── CountBinary.py
│ ├── GamePPC.py
│ └── SignLanguage.py
├── /images/
│ └── [GUI assets]
├── /commands/
│ ├── send_command.txt
│ └── executed_command.txt
└── /ServoMotor/
└── ServoMotor.ino
- Python 3 (core application)
- Tkinter / CustomTkinter (GUI)
- Pillow (PIL) (image handling)
- speech_recognition (voice input)
- Arduino (C++) (hardware control)
- ArduinoJson (command parsing)
- Threading (asynchronous operations)
- Serial Communication (PC ↔ Arduino)
$USER with your actual username):
sudo usermod -aG dialout $USERThe L2L1 project demonstrates a comprehensive, modular, and extensible approach to human-robot interaction. By combining advanced software design with robust hardware integration, it serves as both an educational tool and a platform for experimentation in robotics, accessibility, and user interface design. The architecture supports future enhancements, such as additional games, gesture libraries, or alternative input modalities, making it a valuable foundation for ongoing research and development in interactive robotics.