Refactor servo control into modular architecture with documentation

Code Structure:
- servo.h/c: Low-level servo control (init, PWM, position)
- gestures.h/c: High-level finger movements and hand gestures
- main.c: Clean application entry point

New Features:
- servo_degrees_to_duty(): Convert angle (0-180) to duty cycle
- servo_set_finger_degrees(): Set finger position using degrees
- finger_t enum for type-safe finger identification

Documentation:
- Added Doxygen-style comments (@file, @brief, @param, etc.)
- Professional header blocks for all modules
- Inline comments explaining hardware configuration

API Functions:
- Individual finger control: flex_thumb(), unflex_index(), etc.
- Composite gestures: gesture_make_fist(), gesture_open_hand()
- Demo sequences: demo_individual_fingers(), demo_close_open()
This commit is contained in:
Surya Balaji
2026-01-18 11:38:09 -06:00
parent 7af06f115a
commit 8435f37f84
6 changed files with 572 additions and 175 deletions

5
.gitignore vendored
View File

@@ -9,9 +9,8 @@ venv/
EMG_Arm/.pio/
EMG_Arm/.vscode/
# Data (uncomment if you want to exclude)
# collected_data/
# models/
# Large data files (too big for GitHub)
assets/*.hdf5
# OS
.DS_Store