Reply
Thread Tools
metalx1000's Avatar
Posts: 23 | Thanked: 31 times | Joined on Mar 2008 @ Florida
#1
Written in Python using PyGame, this script plays a Rifle sound every time you point the phone like a Gun.
Here is a Video of it.

Here is the Code.


Very Simple Script I hope will help other just beginning to write code for the phone using the accelerometer.
__________________
Don't give Microsoft the remote control. Don't use Windows 7. <http://windows7sins.org>
 

The Following 5 Users Say Thank You to metalx1000 For This Useful Post:
clasificado's Avatar
Posts: 466 | Thanked: 180 times | Joined on Feb 2010
#2
i will play with it a bit
 
Posts: 143 | Thanked: 4 times | Joined on Jan 2010
#3
am new to this. will u b kind enuf to give me full steps on how to get it working? thx
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#4
 
anapospastos's Avatar
Posts: 552 | Thanked: 183 times | Joined on Oct 2009 @ Not decided
#5
I run python n900mm.py in xterm and it says to me "import sys, pygame, time ImportError: No module named pygame". I have to install this to get it work?
__________________
My name was Maemo, then it became Meego and now I'm getting a third one. I am Sailfish.
 
anapospastos's Avatar
Posts: 552 | Thanked: 183 times | Joined on Oct 2009 @ Not decided
#6
Originally Posted by anapospastos View Post
I run python n900mm.py in xterm and it says to me "import sys, pygame, time ImportError: No module named pygame". I have to install this to get it work?
I tried to install it but it says incompatible package. Any ideas?

Edit: It run just good. I had to run apt-get python-pygame.
__________________
My name was Maemo, then it became Meego and now I'm getting a third one. I am Sailfish.

Last edited by anapospastos; 2010-02-28 at 13:14.
 
metalx1000's Avatar
Posts: 23 | Thanked: 31 times | Joined on Mar 2008 @ Florida
#7
Originally Posted by anapospastos View Post
I run python n900mm.py in xterm and it says to me "import sys, pygame, time ImportError: No module named pygame". I have to install this to get it work?
Humm, I thought PyGame came installed on the N900. But, I guess I was wrong.
__________________
Don't give Microsoft the remote control. Don't use Windows 7. <http://windows7sins.org>
 
metalx1000's Avatar
Posts: 23 | Thanked: 31 times | Joined on Mar 2008 @ Florida
#8
Originally Posted by firstknight View Post
am new to this. will u b kind enuf to give me full steps on how to get it working? thx
Sure, it's simple.
After downloading and unzipping the file,
Navigate, in your terminal (xterm), to the folder called "N900mm".
Once in there type the following:
Code:
./n900mm.py

That is it.
If you need more help, let me know.
__________________
Don't give Microsoft the remote control. Don't use Windows 7. <http://windows7sins.org>
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:50.