RE: Freerunner games / using motion sensors in C
thanks andy. Is this in the wiki ? hint hint if its not -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Schuster Sent: Tuesday, May 13, 2008 2:22 PM To: List for Openmoko community discussion Subject: Re: Freerunner games / using motion sensors in C 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 /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 community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Freerunner games / using motion sensors in C
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 /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 community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community signature.asc Description: OpenPGP digital signature ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Programming in Ruby [WAS: Re: Freerunner games / using motion sensors in C]
Hi there. What about programmin in ruby? Are there already some bindings present to access accellerometers/gps/bluetooth/etc ? If not, are there any plans on making them? On Tue, May 13, 2008 at 9:01 AM, Andy Green <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > 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 /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 > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkgpPNkACgkQOjLpvpq7dMoVuwCfVbgX9PEmkWvsnK8ju7RwzwR5 > ilgAn2tDzszlCky4+Vq7d10iiWqB9A5B > =GNI5 > -END PGP SIGNATURE- > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > -- My corner of the web: http://blog.ramsesoriginal.org ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Freerunner games / using motion sensors in C
On that topic, a joystick interface to the accel. would be rather cool. Cheers, Federico On 5/13/08, Andy Green <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > 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 /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 > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkgpPNkACgkQOjLpvpq7dMoVuwCfVbgX9PEmkWvsnK8ju7RwzwR5 > ilgAn2tDzszlCky4+Vq7d10iiWqB9A5B > =GNI5 > -END PGP SIGNATURE- > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > -- Sent from Gmail for mobile | mobile.google.com ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Freerunner games / using motion sensors in C
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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 /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 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkgpPNkACgkQOjLpvpq7dMoVuwCfVbgX9PEmkWvsnK8ju7RwzwR5 ilgAn2tDzszlCky4+Vq7d10iiWqB9A5B =GNI5 -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community