Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 01:06, 31 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Axyz module PySymbian location example

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Tested with
Devices(s): N95
Platform(s): S60 3rd Edition FP1
Keywords: Axyz
Created: User:Kandyfloss (07 Apr 2008)
Last edited: hamishwillee (31 May 2013)


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.


The device should have accelerometer sensor. Check Archived:Nokia Sensor APIs

# 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
#... Data acquisition callbacks will commence and ended after 15 secs
# Unregister to stop data acquisition callbacks.

Related Links

Archived:The aXYZ - a sensor extension for Python

This page was last modified on 31 May 2013, at 01:06.
49 page views in the last 30 days.