Leveraging Accelerometers in Mobile Devices

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    Leveraging Accelerometers in Mobile Devices - Presentation Transcript

    1. LEVERAGING ACCELEROMETERS IN MOBILE DEVICES Scott Janousek, Hooken Mobile scott janousek
    2. AGENDA INTRO OVERVIEW MOBILE DEVICES & PLATFORMS OUTRO scott janousek
    3. INTRO scott janousek
    4. MINI BIO Scott Janousek Founder & Lead Developer, Hooken Mobile Developer, Evangelist, Coauthor, Educator, Gadget Geek Flash > 8 years Mobile & Devices >= 4 years Symbian, webOS, Android, iPhone = Core Targets Work with OEMS, partners ... those using Flash & related tech scott janousek
    5. HOW MANY PEOPLE ... ARE IPHONE DEVELOPERS? WEBOS? ANDROID? SYMBIAN? WINDOWS MOBILE? RIM? FLASH? OTHERS? scott janousek
    6. HOW MANY PEOPLE ... ... ARE NEW TO ACCELEROMETER? ... HAVE WORKED WITH AN ACCELEROMETER API? ... ON WHAT PLATFORMS? scott janousek
    7. READ THIS scott janousek
    8. JUSTIFICATION “Over 1/3 of Mobile Phones are expected to integrate accelerometers by 2010 ...” - iSuppli scott janousek
    9. OVERVIEW scott janousek
    10. CONTROLLER EVOLUTION 80’s 90’s 2008 >= 2009 “Joysticks” Mobile Pointers Embedded Accelerometers scott janousek
    11. BEHIND THE SCENES scott janousek
    12. MATH & PHYSICS scott janousek
    13. THE 3RD DIMENSION scott janousek
    14. 3 AXIS COORDINATE SYSTEM X AXIS Y AXIS Z AXIS scott janousek
    15. GRAVITY 9.81 m/s² scott janousek
    16. BASICS MEASURES ACCELERATION OF DEVICE RELATIVE TO FREE FALL scott janousek
    17. PULLING G’S 7 g's = 68.64655 m / s2 scott janousek
    18. “OLD SCHOOL” (LINEAR) “ACCELEROMETER” IN 1783 GEORGE ATWOOD (1746-1807) ENGLISH PHYSICIST scott janousek
    19. “NEW SCHOOL” scott janousek
    20. TYPES SINGLE AXIS ACCELEROMETERS (X OR Y OR Z) MULTI AXIS ACCELEROMETERS (X & Y & Z) scott janousek
    21. DETECTS ... MAGNITUDE & DIRECTION OF ACCELERATION AS A VECTOR QUANTITY scott janousek
    22. MEASUREMENTS Static Acceleration (aka Gravity) Tilt of an object Dynamic Acceleration Shock to an Object Velocity Orientation Vibration of an object scott janousek
    23. DETECTION OF ... ORIENTATION VIBRATION SHOCK scott janousek
    24. MOBILE GESTURES SWIPE postive-negative spike SHAKE oscillating wave ROTATE 2 axis change scott janousek
    25. HARDWARE scott janousek
    26. TYPES Capacitive Heat transfer Accelerometers sense a change in electrical capacitance, with respect to Accelerometers measure internal changes in heat transfer due to acceleration. The accelerometer senses the capacitance change between acceleration. A single heat source is centered in a substrate and a static condition and the dynamic state. suspended across a cavity. Thermoresistors are spaced equally on all four sides of the suspended heat source. Under zero acceleration the heat gradient will be symmetrical. Acceleration in any direction causes Piezoelectric the heat gradient to become asymmetrical due to convection heat Accelerometers use materials such as crystals, which generate electric transfer. potential from an applied stress. This is known as the piezoelectric effect. As stress is applied, such as acceleration, an electrical charge is created. Future Accelerometer Advancements In the next decade, NANO technology will create new applications and Piezoresistive dramatically reshape this area of technology. Accelerometers (strain gauge accelerometers) work by measuring the electrical resistance of a material when mechanical stress is applied MEMS-Based Accelerometers MEMS (Micro-Electro Mechanical System) technology is Hall Effect based on a number of tools and methodologies, which Accelerometers measure voltage variations stemming from a change in are used to form small structures with dimensions in the magnetic field around the accelerometer. the micrometer scale (one millionth of a meter). This technology is now being utilized to manufacture state Magnetoresistive of the art MEMS-Based Accelerometers. Accelerometers work by measuring changes in resistance due to a magnetic field. The structure and function is similar to a Hall Effect accelerometer except that instead of measuring voltage, the magnetoresistive accelerometer measures resistance. scott janousek
    27. MEMS MEMS = Microelectromechnical System Accelerometers = MEMS “Sensors” Motion Sensors are fraction of MEMS out there in mobile devices scott janousek
    28. USE CASES scott janousek
    29. USAGE Menu Navigation Screen Rotation Pedometer Gestures GPS-Dead Reckoning Fall Detection Gaming Scrolling Telephony Tap Detection Power conservation Camera Stabilization 3-D object manipulation & More! scott janousek
    30. MARKETS Navigation Medical Engineering Transport Building & Structural Monitoring (dynamic loads) Machinery Health Monitoring Mobile & other Electronic Devices scott janousek
    31. ... HELP US SNAP BETTER MEDIA Image Stabilization scott janousek
    32. ...MAKES LIVES JUST A TINY BIT EASIER ... txtr eBook Reader Kindle DX http://reader.txtr.com/ http://www.kindle.com/ scott janousek
    33. ... KEEPS US ENTERTAINED Nintendo Wii Remote Playstation 3 - Dual Shock Controller (3 axis accelerometer) (6 axis accelerometer) scott janousek
    34. ... PROTECT OUR DATA! IBM/Leveno Apple MacBook Pro (Active Protection System) (Sudden Motion Sensor) scott janousek
    35. ... HELP US STAY IN SHAPE! FitBit - http://www.fitbit.com/ scott janousek
    36. ... IMPROVES MOBILE EXPERIENCES ! iPod HTC Hero iPhone BlackBerry SEMC 905C Pre Touch Diamond Omnia N97 Zune HD Android, Symbian, Windows Mobile, iPhone, webOS, RIM, other devices ... scott janousek
    37. CORE SMARTPHONE FEATURES Camera WiFi & 3G GPS TouchScreen (ideally Multi-touch) Accelerometer scott janousek
    38. MOBILE DEVICES & PLATFORMS scott janousek
    39. FLASH ENABLED MOBILE DEVICE PLATFORMS scott janousek
    40. S60 S60 Mobile Device Platform is underlying OS Nokia has millions of S60 (Symbian) devices on market Most SmartPhones from Nokia have accelerometers (e.g. N900, X-Series, Nokia N97, N96/95, 5800, 5500 Sport) scott janousek
    41. WAYS TO TAP ... First Party 3rd Party Solution Solutions Nokia S60 PLATFORM (Flash only Solution) SERVICES (Native, Flash, other platform access) scott janousek
    42. S60 PLATFORM SERVICES 1.) Download from www.forum.nokia.com: ActionScript Library for S60 Platform Services S60_ActionScript_API_library_1_0.zip 2.) Copy the folder to: /Users/$username/Library/Application/Support/Adobe/Flash CS4/en/Configuration %USERPROFILE%Local SettingsApplication DataAdobeFlash CS3enConfigurationClasses scott janousek
    43. S60 PLATFORM SERVICES //-- Import Platform Service Interface import com.nokia.lib.Service;   //-- Create a new Service object which has Sensor data var sensors = new Service( "Service.Sensor", "ISensor" ); //-- Define input parameters for picking Rotation sensor var inParam = { SearchCriterion:"Rotation" };   //-- Define result value var outParams = sensors.FindSensorChannel( inParam );  scott janousek
    44. S60 PLATFORM SERVICES //-- Define channel info (rotation) var channelInfo = outParams.ReturnValue;   //-- Define valid values for channel info var channelId = channelInfo[0].ChannelId; var contextType = channelInfo[0].ContextType; var quantity = channelInfo[0].Quantity; var channelType = channelInfo[0].ChannelType; var location = channelInfo[0].Location; var vendorId = channelInfo[0].VendorId; var dataItemSize = channelInfo[0].DataItemSize; var channelDataTypeId = channelInfo[0].ChannelDataTypeId; var channelInfo = { ChannelId:channelId, ContextType:contextType, Quantity:quantity, ChannelType:channelType, Location:location, VendorId:vendorId, DataItemSize:dataItemSize, ChannelDataTypeId:channelDataTypeId } scott janousek
    45. S60 PLATFORM SERVICES (CONT) //-- Define input parameters for listening rotation channel data var inParams = { ListeningType:"ChannelData", ChannelInfoMap:channelInfo };   //-- The RegisterForNotification method registers the user to receive data from //-- one sensor channel asynchronously sensors.RegisterForNotification( inParams, callBack ); //-- Because this is an asynchronous method, you need to define the callback function //-- Callback function includes all the channel data function callBack( transactionID:String, eventID:String, outParam:Object ) { if ( outParam.ErrorCode == 0 ) { var channelData = outParam.ReturnValue; var xRot = channelData.XRotation; var yRot = channelData.YRotation; var zRot = channelData.ZRotation; } else { var errorId = outParam.ErrorCode; } } scott janousek
    46. S60 PLATFORM SERVICES EXAMPLE scott janousek
    47. KUNERI LITE Flash Lite does not (natively) support Accelerometer API Kuneri Lite = 3-rd Party “Extender” Kuneri Lite Accelerometer “Plug-in” http://wiki.kunerilite.net/index.php?title=Accelerometer_plugin scott janousek
    48. KUNERI LITE ARCHITECTURE Architecture Flash Lite (1.1/2.x/3.x) ActionScript Local HTTP calls Kuneri Lite Server Symbian C++ Native Kuneri Lite Plug-ins (GPS, Camera, etc) Native S60 on device scott janousek
    49. KUNERI LITE ACCELEROMETER API Start Sensor loadVariables("http://127.0.0.1:1001/Basic/accelerometer?klCommand=readsensor", MC ); Stop Sensor loadVariables("http://127.0.0.1:1001/Basic/accelerometer?klCommand=stopsensor", MC ); Read Sensor loadVariables("http://127.0.0.1:1001/Basic/accelerometer?klCommand=startsensor", MC ); scott janousek
    50. KUNERI LITE EXAMPLE scott janousek
    51. FLASH 10 & ACCELEROMETER Multitouch Accelerometer * GPS * Other Features = TBD Flash Lite now, Flash 10 = 2010 * Check out Mark Doherty’s session here at FITC for more info scott janousek
    52. SONY ERICSSON scott janousek
    53. SONY ERICSSON 18/19 new devices from Sony Ericsson have Accelerometers Motion sensor in games, picture UI, & auto rotation “Shaker Feature” = task switching in music player, etc Can use J2ME and/or Flash to tap into accelerometer API scott janousek
    54. NATIVE FLASH API Tapping into Accelerometer via Flash Lite //-- returns back X,Y,Z values from accelerometer sensor into //-- accX, accY, accZ variables (if supported on target device) loadVariables("accelerometer://data", _root ); Accessing Accelerometer via Flash Lite var sensorCheck_bool:Boolean = true; onEnterFrame = function { loadVariables("accelerometer://data", _root); if (sensorCheck_bool) { //-- only check sensor once! sensorCheck_bool = false; if (accX != undefined && accY != undefined && accZ != undefined) { //-- sensor is reporting, so continue } else { trace("No sensor is reporting! Is this a supported device?"); } } } scott janousek
    55. CAPUCHIN API TAPPING ACCELEROMETER VIA CAPUCHIN http://developer.sonyericsson.com/ scott janousek
    56. CHUMBY scott janousek
    57. CHUMBY - WHAT IS IT? Fun, Open Source Linux Device TouchScreen, Accelerometer, Microphone, Speakers, WiFi Flash Lite 3.x User Interface & Widgets Not Portable without a “Battery Hack”! :) scott janousek
    58. CHUMBY - ORIENTATIONS Source: Developing widgets for Chumby with Flash Lite 3 http://www.adobe.com/devnet/devices/articles/chumby_development.html scott janousek
    59. CHUMBY - FLASH API Source: Developing Flash Lite Widgets for the Chumby Platform http://www.slideshare.net/scottjanousek/developing-flash-lite-widgets-for-the-chumby-platform scott janousek
    60. CHUMBY Source: Cloud Clock http://www.chumby.com/guide/widget/Cloud%20Clock scott janousek
    61. CHUMBY - SOME RESOURCES Developing widgets for Chumby with Flash Lite 3 Includes ActionScript 2.0 Accelerometer Class you can reuse Source: http://www.adobe.com/devnet/devices/articles/chumby_development_06.html AdvancED Flash on Devices - Flash Lite and Flash 10 Chapter 7 - Mobile and Devices Widgets on the Flash Platform (pg 203) http://advancED.flashmobilebook.com/ scott janousek
    62. WEBOS scott janousek
    63. WEB OS Set ability to switch orientation this.controller.listen(document, 'orientationchange', this.handleOrientation.bindAsEventListener(this)); handleOrientation(event) { … } //.position=[1:5], .roll=float, .pitch=float Run code when orientation changes this.controller.listen(document, 'orientationchange', this.handleOrientation.bindAsEventListener(this)); handleOrientation(event) { … } //.position=[1:5], .roll=float, .pitch=float Set ability to switch orientation if (this.controller.stageController.setWindowOrientation) { this.controller.stageController.setWindowOrientation("free"); } Run code when orientation changes this.controller.listen(document, 'orientationchange', this.handleOrientation.bindAsEventListener(this)); handleOrientation(event) { … } //.position=[1:5], .roll=float, .pitch=float scott janousek
    64. WEB OS EXAMPLE AccellBall Example scott janousek
    65. IPHONE scott janousek
    66. LIS302DL COMPONENT LIS302DL Accelerometer scott janousek
    67. IPHONE AXIS scott janousek
    68. OBJECTIVE-C & CLASSES scott janousek
    69. ACCELEROMETER SIMULATOR http://code.google.com/p/acc http:// www.iphonearch.com/ topic/6/iphone- accelerometer-simulator http://code.google.com/p/accelerometer-simulator/ scott janousek
    70. http://mashable.com/ IPHONE EXAMPLE 2008/12/03/iphone- games-accelerometer/ http://www.switchonthecode.com/tutorials iphone-application-with-interface-builder gravity tutorials ... http://www.switchonthecode.com/tutoria accelerometer http://www.tuaw.com/2007/09/10/iphon Gravity Tutorial from Keith Peters scott janousek
    71. ANDROID scott janousek
    72. ANDROID API Haven’t explored yet ... :( API exists Very similar to iPhone scott janousek
    73. scott janousek
    74. BUG COMPONENTS scott janousek
    75. BUGMOTION Module Collar to reduce motion detection field for “spot” detection Motion Sensor 2m range Passive Infrared (PIR) Sensor Sensing Area: 110 degrees horizontal, 93 vertical 80 zones sensitivity 10m rated detection distance Accelerometer 3-Axis accelerometer Software selectable sensitivity (2.5g/3.3g/6.7g/10g) Low non-linerarity ( less than +/- 1% FSO) scott janousek
    76. BUG COMMUNITY APPS http://www.buglabs.net/applications?tag=accelerometer scott janousek
    77. OUTRO scott janousek
    78. Q&A What are your questions? scott janousek
    79. RESOURCES My FITC 2009 Site http://fitc2009.scottjanousek.com/ SEMC Developer’s Site http://developer.sonyericsson.com/ Forum Nokia http://wiki.forum.nokia.com/index.php/Sensor_API http://wiki.forum.nokia.com/index.php/CS001253_-_Displaying_sensor_data_in_Flash_Lite http://wiki.forum.nokia.com/index.php/ How_to_use_S60_Platform_Services_to_create_accelerometer_based_ user_interaction_with_Adobe_Flash_Lite scott janousek
    80. RESOURCES (CONT) iPhone Resources http://www.bit-101.com/blog/?p=1824 http://www.iphonedevsdk.com/ http://www.geekpedia.com/PageView2916_iPhone-Tutorial--Reading-the-Accelerometer.html Android Resources Search on Android, Accelerometer on google. :) Chumby http://www.adobe.com/devnet/devices/articles/chumby_development_06.html scott janousek
    81. RESOURCES (CONT) webOS http://www.webos-internals.org/wiki/Accelerometer BugLabs http://www.buglabs.net/modules/bugmotion Audrino http://www.arduino.cc scott janousek
    82. THE “NEXT” THINGS ... iSuppli predicts the industry for MEMS components will grow from $460 million last year to over $1.6 billion in 2013. The company also expects technology such as gyroscopes and projectors to hit the market as early as 2010. scott janousek
    83. THE “NEXT” THINGS ... Magnetometer = Electronic Compasses Precise Location = Magnetometer + Accelerometer + GPS + (Camera) Next Generation = Augmented Reality + Precise Location scott janousek
    84. THANKS! scott janousek

    + Scott JanousekScott Janousek, 2 months ago

    custom

    1288 views, 4 favs, 2 embeds more stats

    In this session, we'll look at some cool things you more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1288
      • 1272 on SlideShare
      • 16 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 41
    Most viewed embeds
    • 15 views on http://blog.terstepki.com
    • 1 views on file://

    more

    All embeds
    • 15 views on http://blog.terstepki.com
    • 1 views on file://

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories