Accelerometer in Java

Timo Juhani Lindfors timo.lindfors at
Sat Nov 8 15:45:34 CET 2008

Bernd Prünster <bernd.pruenster at> writes:
> my question is: how do i read our data from the accelerometers in java?

You open the file[1] and read data[2].

[1] /dev/input/event{2,3}
[2] data is a steady flow of

struct input_event {
    struct timeval time;
    __u16 type;
    __u16 code;
    __s32 value;

See linux-2.6.26/Documentation/input/input.txt for more info.

More information about the community mailing list