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.
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”
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 |
You can find a tutorial of how it works here
Speranza Ranieri: @httpsperanza
Ernesto Mancusi: @ermancusi
Giuseppe Parrella: @gparrella12
Francesco Sonnessa: @s0nFra
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:
sudo bash
exec<>/dev/ttyACM0
note: if ACM0 does not work, try with ACM1, ACM2, ...
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.