Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 12:53, 7 April 2008.

Axyz module example

From Forum Nokia Wiki

The accelerometer can be used to check the orientation of the mobile device using the axyz module of Cyke64 in python. Here is a test script for axyz which is automatically installed when installing the axyz module on the device.

# Import the extension
import e32
import axyz
 
 
# Define some service function - must take 3 parameters (8 bit int's)
 
def printout(x,y,z):
  print "x: %i y: %i z: %i"%(x,y,z)
 
 
# Data acquisition callbacks will start as soon as a valid Python function is registered
 
axyz.connect(printout)
 
 
#
#
#... Data acquisition callbacks will commence and ended after 15 secs
#
#
 
e32.ao_sleep(15)
 
# Unregister to stop data acquisition callbacks.
 
axyz.disconnect()

See Also : The aXYZ - a sensor extension for Python

Related Discussions
Thread Thread Starter Forum Replies Last Post
mimetypes module? unoll Python 5 2008-04-04 19:46
import array not working danieb_za Python 6 2008-04-09 13:26
how to use messaging.sms_send to send a chinese msg? yyp8015 Python 12 2007-02-28 19:08
[announce] feature module for 3rd cyke64 Python 6 2007-02-04 13:54
CSV files real_dude Python 3 2007-07-21 21:37
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZpythonQ
     qfnZtopicQUqfnTopicZseriesE5f60Q
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX