aimu

Crates.ioaimu
lib.rsaimu
version0.2.3
sourcesrc
created_at2023-10-14 19:13:44.694904
updated_at2023-11-03 12:17:19.480499
descriptionMotion control for handheld computers equipped with a BMI160/BMI260 IMU.
homepage
repositoryhttps://gitlab.com/awahab/aimu
max_upload_size
id1003259
size59,440
(ajwahab)

documentation

README

AIMU

  • Userspace IMU-assisted aiming for Linux.
  • Maps accelerometer+gyroscope motions to virtual mouse movements.
  • Accounts for angle between screen and keyboard (configurable).

Usage

  1. Prepare the system.
    1. BMI160 only: Disable bmi160_i2c and bmi160_core kernel modules.
      sudo rmmod bmi160_i2c bmi160_core
      
    2. Enable i2c_dev kernel module.
      sudo modprobe i2c_dev
      
    3. Add user to i2c group.
      sudo usermod -aG i2c $(whoami)
      newgrp i2c
      
  2. Build and run:
    1. Default: Dynamic dispatch (less performant, more convenient):
      1. Build and run:
        cargo run --release -- --help
        
    2. Static dispatch (more performant, less convenient):
      1. Tweak default values in source code.
      2. Build and run:
        # Optional: add `--features cli` for command line options
        cargo run --release --features bmi160 -- --help
        # or
        cargo run --release --features bmi260 -- --help
        

TODO

  • Revisit virtual gamepad/joystick (separate branch)
  • Expand trigger mappings
  • Add configuration file and env parsing

Aknowledgements

Commit count: 49

cargo fmt