Please, does someone knows what's the code for using the shake on the N95? I think that I have to use the aXYZ module, right? So, how can I adjust the variation of the axyz? Some one please give an example source! Thanks!
Please, does someone knows what's the code for using the shake on the N95? I think that I have to use the aXYZ module, right? So, how can I adjust the variation of the axyz? Some one please give an example source! Thanks!
have you already checked SDK docs for CHWRMVibra API.
Pankaj Nathani
www.croozeus.com
I don't think you can get your phone to shake by changing any sensor values really. Also you can use C++ on reading the sensor info, you do not need to use python for it.
If you want your mobile to vibrate using PyS60 you can do it by using miso
Have a look at this example on Wiki
Best Regards
Croozeus
Pankaj Nathani
www.croozeus.com
No, my idea is not to get the phone to vibrate! Is to shake the phone and then the phones do something, like ShakeLock, ShakeSMS, ShakeMe and etc (only accelerometer devices). I know I have to use axyz module but whats the code for the variation of tha axyz? I mean, whats the code for the app interpret this shake?
Thanks!
nobody has any ideias???
Are you looking for something like shakerracer?
http://blogs.forum.nokia.com/blog/an...ow-open-source
Ron
Yeah, this helps, thanks. The ideia is to shake the phone (N95, N95 8GB, N82, N93i, 5500) and the music player changes the music, just like shake control from Sony Ericsson.
Pankaj Nathani
www.croozeus.com
Thanks for all the help. Does any one have a example code for the accelerometer sensor? And what or the diferences between Sensor module and aXYZ module?
I tried this:
Code:import appuifw import sensor import audio import e32 sensor_type = sensor.sensors()['AccSensor'] acc_sensor = sensor.Sensor(sensor_type['id'],sensor_type['category']) acc_sensor.set_event_filter(sensor.AccEventFilter()) def get_sensor_data(status): if status == elif z < 20 and z > -20: elif y < -20: audio.say(u"Success") def item1(): appuifw.note(u"Your text here", "info") def quit2(): acc_sensor.disconnect() app_lock.signal() appuifw.app.set_exit() def quit(): acc_sensor.disconnect() app_lock.signal() appuifw.app.set_exit() appuifw.app.menu = [(u"About", item1), (u"Exit", quit2)] acc_sensor.connect(get_sensor_data) appuifw.app.screen='normal' appuifw.app.title = u"Test" appuifw.app.exit_key_handler = quit app_lock = e32.Ao_lock() app_lock.wait()
No success, it returns IndentationError: expected an intended block(MT.py, line 13)
![]()
Hi Rafael,
Yes there seems an indent error in the definition of 1st function.
Use 4 indentations in the 1st function as you have done in other cases.
Best Regards
Croozeus
Pankaj Nathani
www.croozeus.com
Croozeus,
Do you mean I need to use like this?
Does any one has any source code of the Acc Sensor?Code:if y < 10 and y > -10: if z < 20 and z > -20: audio.say(u"Success")
By the way, I have replied your e-mail, croozeus
BG
Rafael.