User Tools

Site Tools


getting_started:tutorials:hal2

Reading from a Mouse

In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run examples/controlsystem/mouseTest. This examples reads four axis of a mouse together with three buttons and outputs the results periodically. Further, the safety system checks for the middle button to be pressed. This causes a level change. As soon as the button is released the safety system changes back to the first level.
In order to read from the proper mouse events you can install and run the evtest program.

$ sudo apt-get install evtest
$ sudo evtest

This programm will list all connected devices together with the associated event number. Please adapt the program accordingly. It might be necessary to run it with root priveledges.

getting_started/tutorials/hal2.txt · Last modified: 2017/05/03 07:39 by graf