×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    [Announce] Sensor API Sample Code

    Greetings,

    http://jouni.miettunen.googlepages.com/sensorsample

    Version History

    Version 1.0, release date 2008-04-21.

    Tested with N93 (pyS60 1.4.1), E61i (pyS60 1.4.2) and N95 (pyS60 1.4.2) (thanx Töte for testing!)

    Code Samples

    * How to to use Sensor API
    * How to write common code for sensor and non-sensor devices
    * How to write common code for different sensor combinations
    * How to draw generic polygon with variable number of points
    * How to use resize_callback for UI initialization

    Sensor Sample

    When I participated "Forum Nokia Code Camp: S60 Sensor APIs", my biggest problem was lack of python sample code. Official documentation was very short and didn't tell at all what do with given technical details, Sensor API implementation (sensor.py) was even less helpful. Finally I found the API test code. It wasn't much.

    I just barely managed to make a functional script during the afternoon and that code didn't work in non-sensor devices. Had to use quite a lot of time to experiment and figure out how to do things.

    This script contains everything I know about using Sensor API with PyS60. I hope it helps you to get started a bit faster!

    Disclaimer: I haven't used any sensor device after Code Camp. Töte was kind enough to verify that it actually works in N95! However all possible defects are entirely my faults.

    Enjoy,

    --jouni

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    115

    Re: [Announce] Sensor API Sample Code

    Cheers for this mate, just what I was looking for

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: [Announce] Sensor API Sample Code

    Greetings,

    Version 1.1
    - Code clean-up
    - More comments
    - Not tested on hardware

    http://jouni.miettunen.googlepages.com/sensorsample

    Enjoy,

    --jouni having fun with pylint

Similar Threads

  1. Replies: 3
    Last Post: 2007-10-05, 13:45
  2. Where can i find sample code?
    By eqing2008 in forum Symbian
    Replies: 2
    Last Post: 2006-11-30, 07:15
  3. 3650 mms sample code
    By yanxiang in forum Symbian
    Replies: 3
    Last Post: 2003-12-18, 07:11
  4. Nokia 6310i, SMSEmail sample code
    By Corpr8 in forum General Messaging
    Replies: 0
    Last Post: 2003-03-27, 10:11

Posting Permissions

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