×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Lightbulb [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    hello ,

    With the new version 1.4.1 the sensor module should us allow to access the tilt sensor of the N95 ...
    But as many know it doesn't work until now
    So I try without success to build in standalone sensor module but it did not work.
    When I saw today in the Forum wiki that the sensor UID of the N95 has been published I modify the pyextaccel from Jespern for supporting the N95
    And now it works so I publish the new module !

    N95:
    X value can be one of these 4 values : 0,90,180,270
    Y and Z are always -1

    You can also try it with N93,N93i,E90 perhaps it works too ?

    Examples are installed with the module in !\Python

    links :

    pyextaccel 0.9.2 3rd selfsigned
    pyextaccel 0.9.2 3rd unsigned


    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Cool! Where is the source??

    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  3. #3
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    80

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Saddly I had the same problem as I had with the regular sensor module, and I did sign it ..

    >>> import pyextaccel
    Traceback (most recent call last):
    File "<console>", line 1, in ?
    File "c:\resource\site.py", line 114, in platsec_import
    raise ImportError("Permission denied (error -46). Possible cause: Check that
    %s.pyd is compiled to have at least the same capabilities as this Python interp
    reter process."%name)
    ImportError: Permission denied (error -46). Possible cause: Check that pyextacce
    l.pyd is compiled to have at least the same capabilities as this Python interpre
    ter process.

  4. #4
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Lightbulb Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    hello ,

    tilt sensor on N95 can be used not only for detecting position changing but also for detecting MOVEMENTS !!!

    With this code example it's possible to detect 12 (TWELVE) movements

    Now try to count from 1 to 12 with your phone !
    Easy ?

    And look you python screen change without using any option key when you put in landscape or portrait position

    Code:
    #
    # 
    #Copyright 2007  Cyke64 (cyke64 at gmail.com)
    #    Licensed under the Apache License, Version 2.0 (the "License");
    #    you may not use this file except in compliance with the License.
    #   You may obtain a copy of the License at
    #   
    #     http://www.apache.org/licenses/LICENSE-2.0
    #     
    #    Unless required by applicable law or agreed to in writing, software
    #    distributed under the License is distributed on an "AS IS" BASIS,
    #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    #    See the License for the specific language governing permissions and
    #    limitations under the License. 
    #
    #
    #
    
    import e32
    import pyextaccel as tilt
    import audio
    import appuifw
    init=0
    first=-1
    second=-1
    
    def handle_mvt(first,second):
      if first==0 and second==90:
         audio.say(u'one')
    
      elif first==90 and second==180:
         audio.say(u'two')
    
      elif first==180 and second==270:
         audio.say(u'three')
    
      elif first==270 and second==0:
         audio.say(u'four')
    
      elif first==0 and second==270:
         audio.say(u'five')
    
      elif first==270 and second==180:
         audio.say(u'six')
    
      elif first==180 and second==90:
         audio.say(u'seven')
    
      elif first==90 and second==0:
         audio.say(u'eight')
    
      elif first==0 and second==180:
         audio.say(u'nine')
    
      elif first==180 and second==0:
         audio.say(u'ten')
    
      elif first==90 and second==270:
         audio.say(u'eleven')
    
      elif first==270 and second==90:
         audio.say(u'twelve')
        
    def cb_mvt(x,y,z):
      global init,first,second
      if init==0:
        print 'init movement'
        first=x
        init=1
      else:
        second=x
        handle_mvt(first,second)
        first=second
    
      if x==0:
        print 'left'    
    
      elif x==90:
        print 'normal'    
    
      elif x==180:
        print 'right'    
    
      elif x==270:
        print 'reverse'    
    
    def cb_abs(x,y,z):
      if x==0:
        print 'left'    
        appuifw.app.orientation='landscape'
      elif x==90:
        print 'normal'    
        appuifw.app.orientation='portrait'
    
      elif x==180:
        print 'right'    
        appuifw.app.orientation='landscape'
    
      elif x==270:
        print 'reverse'    
        appuifw.app.orientation='portrait'
    
    def begin_abs():
      tilt.register(cb_abs)
    
    def begin_mvt():
      tilt.register(cb_mvt)
    
    def stop():
      tilt.unregister()
      app_lock.signal()
    
    appuifw.app.menu=[(u'Absolute position',begin_abs),(u'detect movement',begin_mvt),(u'stop',stop)]
    app_lock=e32.Ao_lock()
    app_lock.wait()
    I'm sure that you could find application to this !
    I'm thinking about keyboard lock when you put you phone in your pocket (usually I put it head down) and I take it head up

    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  5. #5
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Quote Originally Posted by lfd View Post
    Cool! Where is the source??

    LFD
    I believe that I have seen it HERE !

    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    2

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Why can the N95's sensor only output 4 values on the X-axis? I mean, if it is a ST LIS302DL accelerometer, you should be able to retrieve values from al three axes? I've tried using both the Python implementation and the SensorTest example (Symbian C++), but both are only able to output the 4 values.

    Do you think Nokia will update this in a future release of the Sensor API, or is there somebody at Nokia who we can try to contact, or maybe submit a feature request?

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    2

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Answering my own question - it seems that using Nokia Research's RD Accelerometer plug-in is the way to go. It is part of their activity monitor project.

  8. #8
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Hi,

    I am new to python (but not to programming ^^). I want to use the N95 accelerometer in my application. I saw that I need to install pyestaccel, but when I launch the selfsigned installer, the phone tell me that the certificate is expired.

    What can I do ? Because I really want to enjoy the accelerometer ^^.

    Thanks

  9. #9
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Certificate expired

  10. #10
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Quote Originally Posted by Okyn View Post
    Hi,

    I am new to python (but not to programming ^^). I want to use the N95 accelerometer in my application. I saw that I need to install pyestaccel, but when I launch the selfsigned installer, the phone tell me that the certificate is expired.

    What can I do ? Because I really want to enjoy the accelerometer ^^.

    Thanks
    Hello Okyn

    pyextaccel is deprecated for N95 because it show only tilting (4 values)
    There's a better solution for you : aXZY

    BR
    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  11. #11
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Quote Originally Posted by neil.young View Post
    Certificate expired
    Thanks
    I'll fixup this soon
    For N95 try aXYZ !

    BR
    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  12. #12
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Hi Cyke,

    guess, what AXYZ produces on my machine? Yes, "Importerror, permission denied (error -46) Possible cause: Check that axyz.pyd is compiled to have at least the same capabilities as ther pyhton interpreter process..."

    All the mess with the Symbian self certificate just to get this...

    I remember a time, when it was easier to crash programs

    char * p = null;
    *p = 'a';

  13. #13
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Quote Originally Posted by neil.young View Post
    Hi Cyke,

    guess, what AXYZ produces on my machine? Yes, "Importerror, permission denied (error -46) Possible cause: Check that axyz.pyd is compiled to have at least the same capabilities as ther pyhton interpreter process..."

    All the mess with the Symbian self certificate just to get this...

    I remember a time, when it was easier to crash programs

    char * p = null;
    *p = 'a';
    What a pity
    Try to install envy and say what it display when you enter this statement !
    Code:
    import envy
    print envy.has_capabilities('unsigned')
    print envy.has_capabilities('selfsigned')
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  14. #14
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Hi Cyke,

    makes the things worse:

    Installing envy_3rd_1_0_0_selfsigned.sisx results in an error message after the installation. "Required program access not granted" (vague translation from german).

    Unsigned installtion failed due to invalid certificate...

  15. #15
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [announce] pyextaccel 0.9.2 supports now N95 tilt sensor !

    Hy cyke,

    with the ensymble experience (don't install to e I tried your envy again, now installed on c:

    Using developer certificate signed, C:\ installed PyShell the statement

    import envy

    results in tons of exception messages, the last is:

    "Permission denied (error-46) Possible cause: Check that _envy.pyd is compiled to have at least the same capabilities as this Python interpreter proces..."

    I'm getting nuts with this..

    How could I sometimes follow this advice...?!?

Similar Threads

  1. N95 Light sensor
    By leroykussy in forum Symbian Tools & SDKs
    Replies: 11
    Last Post: 2010-01-13, 14:37
  2. Classic N95 vs US ver. N95
    By qwerty0824 in forum General Development Questions
    Replies: 5
    Last Post: 2007-09-13, 18:09
  3. Tilt sensor in 3220
    By dwigdor in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2005-02-14, 20:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •