Skip to content

Internship undertaken with University of Glasgow School of Computer Science under Dr. Jonathan Grizou in collaboration with Imperial College London.

Notifications You must be signed in to change notification settings

FKGSOFTWARE/EMGControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# EMG Sensor Project

## Overview
This comprehensive project interfaces with EMG sensors and load cells using Arduino. It combines data acquisition, processing, and visualization, offering functionalities such as:
- Reading and visualizing data from EMG sensors and load cells.
- Extracting hand and body landmark information from video data.
- Calculating angles based on hand and body landmarks.
- Interacting with games and controlling mouse movements.
- Applying filters to the acquired data.

## Files

### Arduino Scripts:

#### 1. 2_emg_sensor_default.cpp
- **Description**: Interfacing with up to two EMG sensors.
- **Usage**:
  - Upload to your Arduino board.
  - Connect sensors to specified analog pins.
  - Establish serial connection.

#### 2. 2_emg_1_load_dac.cpp
- **Description**: Interface with two EMG sensors and a load cell.
- **Usage**: 
  - Upload to Arduino.
  - Connect sensors and load cell to specified pins.

#### 3. arduino giga load cell loadout.cpp
- **Description**: Interface specifically with a load cell using the HX711 library.
- **Usage**: 
  - Upload to Arduino.
  - Connect the load cell to specified pins.

#### 4. 2_emg_sensor_game.cpp
- **Description**: Interfacing with two EMG sensors for game-related applications.
- **Usage**: 
  - Upload to Arduino.
  - Connect sensors to specified pins.

### Python Scripts:

#### 5. AEMG_SP default.py
- **Description**: Read and process the serial data from the Arduino and visualize the sensor data.
- **Usage**: 
  - Install necessary libraries.
  - Run the script.

#### 6. hand+body_to_angle_001.py
- **Description**: Calculate angles based on hand and body landmarks.
- **Usage**: 
  - Specify file path containing landmark data.
  - Run the script.

#### 7. mediapipe_handbones.py
- **Description**: Process video data to extract hand landmark information using MediaPipe.
- **Usage**: 
  - Specify video file directory.
  - Run the script.

#### 8. complete_script_with_interpolation.py
- **Description**: Process datasets related to arm angles and EMG readings.
- **Usage**: 
  - Specify dataset paths.
  - Run the script.

#### 9. AEMG_SP filters + toggle + mouse.py
- **Description**: Interface with EMG sensors and apply filters. Provides functionalities for toggling and mouse interactions.
- **Usage**: 
  - Set configurations and file paths.
  - Run the script.

#### 10. plotting_script_MOUSE.py
- **Description**: Visualize data from CSV files.
- **Usage**: 
  - Specify CSV directory.
  - Run the script.

#### 11. AEMG + Filters + Game Q - working.py
- **Description**: Interface with EMG sensors, apply filters, and connect to a gaming module.
- **Usage**: 
  - Set configurations.
  - Run the script.

#### 12. AEMG_SP filters.py
- **Description**: Interface with EMG sensors and apply data filters.
- **Usage**: 
  - Set configurations.
  - Run the script.

#### 13. Breakout_attempt_002.py
- **Description**: Classic Breakout game potentially integrated with other project parts.
- **Usage**: 
  - Run the script.
  - Control the paddle using integrated controls.

## Setup and Usage:

### Arduino:
1. Upload the desired `.cpp` file to your Arduino board.
2. Ensure the sensors/load cells are connected to the specified pins.
3. Start serial communication with the specified baud rate.

### Python:
1. Install the required libraries:
   ```
   pip install numpy serial pandas PyQt5 pyqtgraph
   ```
2. Navigate to the script's directory and run your desired `.py` file:
   ```
   python [script_name].py
   ```

## Customization
- Modify constants in Python scripts as required.
- Update `sensor_placement_dict` for additional sensors or change placements.

## Troubleshooting
- Ensure the Arduino is connected and that the correct COM port is selected in the Python script.
- Ensure that the baud rate matches between the Arduino and Python scripts.
- Check Python script logs for errors or anomalies.

About

Internship undertaken with University of Glasgow School of Computer Science under Dr. Jonathan Grizou in collaboration with Imperial College London.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors