Skip to content

An implementation of a wearable air mouse for Embedded Systems exam.

License

Notifications You must be signed in to change notification settings

gparrella12/AirMouse

 
 

Repository files navigation

Air Mouse - Fingers

IMG_5269 HEIC

Project

The project consists of a wearable mouse realized for the Embedded Systems project (2021/2022) – Computer Engineering, University of Salerno. Using the accelerometers placed on the fingers, it is possible to interpret hand gestures in the following commands:

  • Left Click
  • Double Left Click
  • Zoom In / Out (CTRL +/-)
  • Alt + Tab

Furthermore, all commands performed with the mouse are recorded in a text file saved on a Micro SD card.

Protocols and Interfaces

Interfaces
I2C1 I²C port used for the accelerometers with addresses 0x00 on index, 0x02 on thumb.
I2C2 I²C port used for the Real Time Clock module.
SPI3 SPI port used for the Micro SD reader.
USART2 Serial port of the board used for communication with the computer.

On board LED: Visual indicator of the system status:

  • ON for “System ready”
  • OFF for “System not ready”

Software Architecture

Architettura

Fritzing Scheme

schema fritzing con PC

Sotware Protocol: MCU - PC interaction

The interaction with the computer takes place via the serial port. The commands sent via serial are interpreted by the xdotool software available on Linux systems. The used commands are:

Actions Commands
Movements xdotool mousemove_relative – 𝛥x 𝛥y
Left Click xdotool click 1
Double Click xdotool click --repeat 2 1
Zoom In xdotool key Ctrl + plus
Zoom Out xdotool key Ctrl + minus
Alt + Tab xdotool keydown alt key Tab
Window switching xdotool keydown Tab && sleep 0.1 && xdotool keyup Tab
ALT+TAB Release xdotool keyup alt

Video Tutorial

You can find a tutorial of how it works here

Authors

Speranza Ranieri: @httpsperanza

Ernesto Mancusi: @ermancusi

Giuseppe Parrella: @gparrella12

Francesco Sonnessa: @s0nFra

How to Run

It's necessary to clone the repository in the STM32CubeIDE and run the project. On PC side, you can run the command executor with the following commang: sudo ./commandScript.sh. After that, the commands received from the serial port are executed (note that in the script the default serial port is /dev/ttyACM0 , you can modify it by inserting the correct serial port detected in your PC for STM32).

You can also execute the mouse commands by opening a Linux terminal and executing the following commands:

  1. sudo bash
  2. exec<>/dev/ttyACM0

note: if ACM0 does not work, try with ACM1, ACM2, ...

Who can contribute to this project?

Since this is an assignment project, only the authors can contribute to this project. Despite this, you are still free to use and distribute the code contained in this repository for your own projects according to GNU GPL v3.

About

An implementation of a wearable air mouse for Embedded Systems exam.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.3%
  • Makefile 3.1%
  • Other 0.6%