Freerunner LightSaber

From Openmoko

Jump to: navigation, search


Here is the link http://filmsbykris.com/freerunner-debian/ko-user/ko-lightsaber.tar.gz

Contents

How to install

Prerequisite: You must install python-pygame from the repository.

Just un-tar the lightsaber tarball to your root directory and it should place everything where it needs to be and give you an icon on your desktop.

What it does

Start the App and the phone sounds like a LightSaber Extending and then Humming (You know, Like StarWars) Swing the Phone Around and it sounds like you're having a LightSaber Fight.

Features so Far

Sound, Vibration, and The Power Button LED flashes Blue on Swings.

Todo list

Work on the GUI (Currently just a big exit button) add buttons to extend and retract Saber ( so you don't have to exit the program to stop the sounds ) And some sort of graphic or image of a Light Saber. Add More sounds Have buttons so you can choose the color of you lightsaber.

Bugs

Sometimes while exiting, if you are still swinging the phone around, the LED and/or the vibrator will stay on. If this occurs, start the app up again and then close it with out swinging the phone around. I believe I can fix this with ease. I just wanted to get what I have done out before I continued working on new things.

If you are using Debian, then pygame audio won't work (maybe related to this Debian bug). You have to export SDL_AUDIOMIXER=alsa. You'll also need to either make changes to the code to reflect that arguments to Sound.play() are different in the debian version of pygame (which is outdated), or install pygame from source.

Pathnames for sounds are hardcoded into the script -- for those who like to install unpackaged software in /usr/local, you'll need to open up the ko-lightsaber file and change the paths.

In SHR there are wrong path for the LED and the program didn't work because of wrong accelerometer data retrieval. See discussion for a working program source.

Personal tools