thinkpads.com Support Community Forum Index Bill Morrow's thinkpads.com Open Forum - The Original Thinkpad Support Forum
Follow ThinkpadsForum on Twitter
eCoupons
Save with Lenovo ThinkPad eCoupons
Exclusive 4% CASH BACK from eCoupons.com
Support this forum, shop at newmodeus.com
 
It is currently Sat May 25, 2013 3:09 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Use the accelerometer as a joystick
PostPosted: Sun Aug 22, 2010 11:57 pm 
Offline

Joined: Mon May 10, 2010 8:29 pm
Posts: 9
Location: australia, perth, wa
I've written a program that sends accelerometer data to ppjoy virtual joystick 1. It lets you control games by tilting your thinkpad.

You'll need to download and set up ppjoy (google it) - I used version 0.8.4.5 on win 7.

My files are here:
http://rapidshare.com/files/414368643/aps_ppjoy.zip

In the .zip file, there's an exe called aps2ppjoy.exe that will send the data to ppjoy. It comes up as a blank console window. To check if it's working, calibrate the ppjoy virtual joystick (must be number 1!) using the windows joystick calibration tool. Try looking/searching for gamepad in the control panel.

It works - but it's dirty. Uses about 10% of CPU on my x61 tablet. Until someone with more knowledge than me can write a proper HID driver for the accelerometer, it's the best we've got.

Enjoy!

UPDATE: I've modified the code to get cpu usage <1%, but since nobody's download or posted, I can't be bothered to put it in rapidshare. If you want it, PM me.

UPDATE: I've had a few PMs now, so here's the link
http://rapidshare.com/files/418231223/a ... _sleep.exe

I'm not a pro and it tickles me pink to know that people are using my work, so please post and let me know how you go.


Last edited by thinkpadrobert on Sun Dec 19, 2010 3:47 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Sun Dec 19, 2010 3:47 am 
Offline
Freshman Member

Joined: Wed Dec 23, 2009 5:55 am
Posts: 64
Location: Hauwert, Netherlands
sounds very good! can I get the files for this new version?


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Wed Dec 29, 2010 1:10 am 
Offline
Freshman Member

Joined: Wed Dec 29, 2010 12:16 am
Posts: 52
Location: United States of America
I found this in a google search for "thinkpad accelerometer joystick". I just had to register to say this is just what i wanted to find. :D It works perfectly with my Thinkpad X41 Tablet that I had gotten for christmas.

_________________
Owner of a IBM ThinkPad X41 Tablet PC


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Wed Jan 12, 2011 1:31 am 
Offline

Joined: Mon May 10, 2010 8:29 pm
Posts: 9
Location: australia, perth, wa
Thanks for posting! It's good to know you're enjoying it.


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Sat Jan 29, 2011 11:00 am 
Offline
Sophomore Member

Joined: Tue May 30, 2006 6:42 pm
Posts: 197
Location: New York
I set this up on my x60 and it is working well. Thanks! But I don't know what to use it for...what games would you suggest? I got the alternative, the sdl dll and used that with neverball but honestly it was very hard to control...I think yours would be much better, but most indie games don't allow for joysticks. Even the game I really wanted to play, Labyrinth, doesn't either. I tried the joystick to mouse program with your virtual joystick and I swear I almost broke the computer. LOL


Top
 Profile  
 
 Post subject: Use the accelerometer as a joystick
PostPosted: Sat Jan 29, 2011 11:16 am 
Offline
Freshman Member

Joined: Tue Nov 27, 2007 6:06 am
Posts: 80
Location: Singapore
theres one game about controlling penguin in a downhill ski resort. but i forgot the title. try find it at youtube


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Sat Jan 29, 2011 11:57 am 
Offline
Moderator
Moderator

Joined: Thu Apr 12, 2007 8:23 am
Posts: 13227
Location: Upstate New York
kaede wrote:
theres one game about controlling penguin in a downhill ski resort. but i forgot the title. try find it at youtube

http://tuxracer.sourceforge.net/


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Mon Jan 31, 2011 10:42 am 
Offline
Freshman Member

Joined: Wed Dec 23, 2009 5:55 am
Posts: 64
Location: Hauwert, Netherlands
I've tried it on my new X201 Tablet, but unfortunately, it doesn't work. according to one of the test programs, the axis value is always at maximum when I turn on the accelero. I think I know the problem, I'm using 64 bit windows 7. my T400 with win7 32 bit works flawless.
If anybody has got a solution for this, I'd love to hear it!


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Mon Jan 31, 2011 1:38 pm 
Offline
Freshman Member

Joined: Wed Dec 29, 2010 12:16 am
Posts: 52
Location: United States of America
It seems to be incompatible with x64. I'm not sure how it was done or how it works, but i think the method needed for getting the accelerometer data is different in x64, that or maybe he needs to compile an x64 executable to run natively? *shrugs*

_________________
Owner of a IBM ThinkPad X41 Tablet PC


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Tue Feb 01, 2011 5:14 pm 
Offline
Sophomore Member

Joined: Tue May 30, 2006 6:42 pm
Posts: 197
Location: New York
kaede wrote:
theres one game about controlling penguin in a downhill ski resort. but i forgot the title. try find it at youtube


I've tried tuxracer as well as neverball and I have just download blazetris. But again, these are modified sdl games and they don't need this joystick software. Anyone know of real games that I can use this joystick program for?


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Fri Feb 11, 2011 11:56 am 
Offline
Freshman Member

Joined: Wed Dec 29, 2010 12:16 am
Posts: 52
Location: United States of America
It's kind of fun to play with. But to be honest. It isn't ideal for any sort of games or anything. It's a laptop/tabletPC, not a handheld device.

_________________
Owner of a IBM ThinkPad X41 Tablet PC


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Fri Mar 11, 2011 9:35 am 
Offline

Joined: Mon May 10, 2010 8:29 pm
Posts: 9
Location: australia, perth, wa
I haven't tried to run it on an x64 OS, and I compiled it in a 32bit OS, so that would explain your problems. I've used it with project 64 to play episode 1 pod racer. It's pretty hard work though! You could always use it to turn your computer into an etch-a-sketch or a midi controller. I don't run x64 so have no plans to recompile it, but may do so in the near future. I'll supply the source to someone who can compile in x64 though.


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Mon May 16, 2011 10:47 am 
Offline
Senior Member
Senior Member

Joined: Sun Apr 03, 2011 3:38 pm
Posts: 593
Location: Klamath Falls, OR
For a real experience, use your Wii bluetooth devices on PC's... controller, balance board, etc... google for "Wii controller PC"

The coolest usefull thing ive seen the accellerometer in IBM's used for is in linux to switch virtual displays, by "knocking" the laptop left or right... 1 TAP--> 2 TAP --> 3 TAP <-- 2 or locking/unlocking it with a specific "knock" sequence...

http://www.ibm.com/developerworks/linux ... index.html

http://www.ibm.com/developerworks/opens ... xthinkpad/

or use for screen rotation...

http://www.thinkwiki.org/wiki/Using_hda ... n_rotation

_________________
(2)701C,(1)760EL,(6)760XL,(1)760XD
(4)CD Drives (5)int floppies (3)ext floppy (4)2.1GB
(10)CF/IDE w/2 or 4GB 133x CF (1)760XL restore CD
(1)Belkin USB 2.0 32bit Cardbus (2)WPC54G(S) Wifi Cardbus
(1)Belkin F5D5020 NIC (1)Giga-Byte GN-WLM01 Wifi
(1)Backpack CD (1) Xircom REM56G-10 + misc


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Wed Apr 04, 2012 4:56 am 
Offline

Joined: Mon May 10, 2010 8:29 pm
Posts: 9
Location: australia, perth, wa
Rapidshare tells me they are deleting the file because it's not been downloaded too often. If anyone still wants the binary or the source, please contact me by replying to this post. I check here every so often.


Top
 Profile  
 
 Post subject: Re: Use the accelerometer as a joystick
PostPosted: Wed Apr 04, 2012 4:50 pm 
Offline
Freshman Member

Joined: Wed Dec 29, 2010 12:16 am
Posts: 52
Location: United States of America
thinkpadrobert wrote:
Rapidshare tells me they are deleting the file because it's not been downloaded too often. If anyone still wants the binary or the source, please contact me by replying to this post. I check here every so often.

I could upload it to a number of mirrors. One of which is my own and will remain up for at least another year (had it for 4 years so far)

_________________
Owner of a IBM ThinkPad X41 Tablet PC


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group