Hi,
would be cool if someone can hook the accelerometers into libsdl and let
them look like a joystick ...

Regards
Robert

Andy Green schrieb:
> Somebody in the thread at some point said:
> 
> | If somebody tells me how to use the accelerometers, I will have a go. Is
> | it just like /dev/joydev ?
> 
> You just open /dev/input/event2 (top accel) and/or 3 (bottom).  Have a
> look in <cross path>/usr/include/linux/input.h -- basically these guys
> turn up in there 300 a second:
> 
> struct input_event {
>     struct timeval time;
>     __u16 type;    <==== type = 2
>     __u16 code;    <==== code = 0=X, 1=Y, 2=Z
>     __s32 value;   <==== signed mG force in 18mG steps
> };
> 
> -Andy

_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to