Control a 3D-printed robotic arm using two different input methods:
- Hand Gestures Controller (OpenCV)
- Keyboard Controller (Serial Monitor)
This project applies embedded systems and computer vision to control a physical robotic arm in real time.
robotic-arm-controller
├── include
│ └── keyboardController.h
│
├── opencv_controller
│ ├── CMakeLists.txt
│ ├── gestureController.cpp
│ ├── gestureController.h
│ ├── serial.cpp
│ ├── serial.h
│ ├── .vscode
│ └── src
│ └── main.cpp
│
├── platformio.ini
│
└── src
├── output
├── keyboardController.cpp
└── main.cpp
Build / Compile Using PlatformIO:
pio run
Upload to Arduino
pio run --target upload
Open Serial Monitor
pio device monitor
You will be asked to pick a mode:
- Keyboard Controller
- Gesture Controller
If you select Keyboard Controller:
- Stay in the PlatformIO Serial Monitor
- Press keys to move the robotic arm joints
- Commands are sent directly to the Arduino through serial
If you select Gesture Controller, then:
- Close the PlatformIO serial monitor (the OpenCV program needs the serial port)
- Build the OpenCV gesture controller:
cd opencv_controller
mkdir build
cd build
cmake ..
cmake --build . --config Release
- Run the gesture controller executable:
.\Release\opencv_controller.exe
This will:
- Open your webcam
- Detect hand poses
- Translate gestures into servo commands
- Send commands to the Arduino over serial
robot-hand-gesture-demo.mp4
- PlatformIO IDE
- CMake
- OpenCV
- Prices and quantity of all hardware componets, 3D-printed parts, and electronics used in this project can be found in the following spreadsheet: Click to View Full Materials List (Google Sheets)
Based on open-source models designed by: LimpSquid