Ứng dụng đánh trống qua Acclerometer của N95.
Mình không test được do thiếu file và thiết bị. Bạn nào rành tiếng Anh rồi test thử làm 1 bài giới thiệu nha:
Trước khi đọc, các bạn dùng IDM down file này về xem đã
Mã:
http://www.youtube.com/watch?v=lOSEQDckp6I
N95 Drum We will rock you with N95 accelerometer
by chirpho from Singapore
Before you proceed, we assume that you have already installed Nokia PC Suite on your PC, using the provided CD in the Nokia box. This software allows easy data transfer between the phone and PC.
Prerequisite: (Install in the prescribed order)
On PC:
1. Install in the prescribed order: Python 2.5.2, pywin32, PySerial.
2. Place C:\Python25 in the Path environment variable.
3. Extract the API folder to your PC.
4. Set up Incoming Bluetooth COM Port, say COM4.
5. Change the COM port number in the file pythonserver\syncA.config
>>>> PC Done!!
6. Plug your phone in to the PC.
7. On your phone, choose PC Suite. If you get three 'ding's and no response, you probably haven't got Nokia PC Suite installed on your PC.
8. On your PC, open Nokia Application Installer, which goes together with Nokia PC Suite. You can find it in Nokia PC Suite folder.
9. In Nokia Application Installer, in the left window, choose your N95 in the drop down list. If you can't find your phone in the list, unplug and replug in your phone.
10. In Nokia Application Installer window, install the following softwares by double clicking the installation files: PythonForS60, PythonScriptShell, N95RDAccelerometer, aXYZ.
11. On PC, browse to the phone's directory. Then to drive "E" of the phone. Then to folder "Python". Create directory "lib" in folder "Python" on the phone.
12. Copy the files phcomm.py, keyboard_module.py, phone_bd_component.py, phone_instrument.py from "to phone" folder in our package to the "lib" directory on the phone, created from previous step.
13. Copy phone_client.py to the folder "Python" on the phone.
>>>> Phone Done!!
============
How to run |
============
On PC.
Supposedly, we put all the files on PC into folder "project"
In folder project: run_javaserver.bat, run_pythonserver_A.bat (currently opening connection over Bluetooth com port 9; you should change confA.config to open connection over the Bluetooth com port available on your PC), global.config, risset.config, string.config and string.config.
In project\javaserver: MyDemoServer.class, MyDemoInstrumentThread.class, folder classes, SoundModels, ASWCore.jar
In project\libs: instrument_server.py, phcomm.py, server_bd_component.py
In project\pythonserver: pyserver.py, confA.config (open connection over bluetooth comm port 9)
- Run these two executables run_javaserver.bat, run_pythonserver_A.bat
=========
On phone:
- Open python, run script, choose phone_client.py.
- In the pop up menu, choose Other... (for the first time) or Default host (for subsequent times).
- In the list, choose the PC name that you're connecting to, then choose the Bluetooth Com Port that the python server on PC is opening. For the first time, on your PC, there'll be a small notification box in yellow popping up in the right bottom corner. Click on that and authorize the phone. Remember to tick Always authorize.
- Choose the desired instrument you want to play.
- Press Exit to quit.
** Note: If you want to play multiple instruments, run various python server listening to differnt COM ports.
** You can change confA.config, confB.config and confC.config to open python server listening to your desired Bluetooth COM port.
What we want:
1. A python server running PC to receive accelerometer's readings from the phone. It's also a client to the java server. The python server interpretes accelerometer and keypad readings into musical commands.
2. A python client on phone to send accelerometer's readings to PC.
3. A java server on the PC to receive musical commands from the python server.
File cài đặt:
Mã:
http://rapidshare.com/files/109280740/prerequisite_software_2_.zip.html
http://www.box.net/shared/hf5qmk6osc
Chúc các bạn may mắn! Ứng dụng hay mà không test được do trình độ có hạn!