Android Topics Sensors Accelerometer and the Coordinate System

Slides:



Advertisements
Similar presentations
Touchdevelop api api acceleromete r measure acceleration Disclaimer: This document is provided as-is. Information and views expressed in this document,
Advertisements

Slide Ruler. ? X 5" On today’s menu...  What happened with Gravity  Noise  The tool today  Fundamental Limitations  Magical Christmas Land  (Where.
Use it Free: Instantly Knowing Your Phone Attitude Pengfei Zhou*, Mo Li Nanyang Technological University Guobin (Jacky) Shen Microsoft Research.
Use it Free: Instantly Knowing Your Phone Attitude Pengfei Zhou*, Mo Li Nanyang Technological University Guobin (Jacky) Shen Microsoft Research.
Ryan Roberts Gyroscopes.
Newton’s 2nd Law How does a cart change its motion when you push and pull on it? You might think that the harder you push on a cart, the faster it goes.
Tablet Computers Georgia 4- H Cotton Boll and Consumer Judging 2013.
Creating Mobile Apps with App Inventor! Day 4 Google search Kris Gordon Ludlow for links.
Tablet Computers Georgia 4- H Cotton Boll and Consumer Judging 2013.
Session 1.1. Windows Phone Topics Session 1.1 Windows Phone The Windows Phone Device.
The Accelerometer and Gyroscope
CS378 - Mobile Computing Sensing and Sensors. Sensors "I should have paid more attention in Physics 41" Most devices have built in sensors to measure.
CS378 - Mobile Computing Sensing and Sensors. Sensors "I should have paid more attention in Physics 41" Most devices have built in sensors to measure.
Rotor Track and Balance
Describing Motion: Kinematics in One Dimension AP Physics Chapter 2.
Smartphone Overview iPhone 4 By Anthony Poland 6 Nov 2014.
Name :Promethean ABV387S300 Interactive Whiteboard Description : The Promethean ABV387S300 Interactive Whiteboard is the best solution for the interactive.
Slide # 1 Velocity sensor Specifications for electromagnetic velocity sensor Velocity sensors can utilize the same principles of displacement sensor, and.
Lecture # 9 Hardware Sensor. Topics 2  SensorManger & Sensor  SensorEvent & SensorEventListener  Example Application.
Doodlz App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Biometric System Design for Handheld Devices Team 4 Naif Alotaibi, Rich Barilla, Francisco Betances, Aditya Chohan, Alexandra Garcia, Alexander Gazarov,
S ENSORS U SED I N G AMES By Wusqa Waqar. What are sensors and how are they used in games? A sensor is a converter that measures a physical quantity and.
Robot sensors MVRT 2010 – 2011 season. Analog versus Digital Analog Goes from 0 to 254 Numerous values Similar to making waves because there are not sudden.
CS378 - Mobile Computing Sensing and Sensors Part 2.
Final Year Projects Prof. Joseph Ng. Mobile Application Development Sensor Programming Android Platform Preferred Applications on the following domains:
Sensors in android. App being more applicable Keeping track of your heart beat while jogging. Pointing the phone camera towards the night sky to know.
Kunal Bavishi INTRODUCTION TO ACCELEROMETERS AND USE OF IT IN ADVANCED EMBEDDED SYSTEMS COURSEWORK TK is figured as follows: $97 for.
Current Works Corrected unit conversions in code Found an error in calculating offset (to zero sensors) – Fixed error, but still not accurately integrating.
Newton’s First Law Newton’s Second Law
Static Equilibrium Physics 150/250 Center of Mass Types of Motion
Gonzales, Jamil M. Tengedan, Billy R.
Sensors For Mobile Phones  Ambient Light Sensor  Proximity Sensor  GPS Receiver Sensor  Gyroscope Sensor  Barometer Sensor  Accelerometer Sensor.
Chapter 3: Vectors & Two-Dimensional Motion
Graphs. Topic Overview The motion of an object can be represented by two types of graphs (x, v) 1) Displacement vs. Time graphs Tells you where the object.
Lecture 4: Sensors Topics: Motion, Position, and Environmental Sensors Date: Feb 11, 2016.
MOBILE SENSORS BY OLIVIA TUFFS-MOULDS. ACCELEROMETER An accelerometer is a device, hidden in the motherboard of a smartphone, is a sensor which detects.
The sensors guide fingerprint sensors rate monitor gyroscope camera
Friction. I. Friction A. Background 1. A force that acts opposite the direction of movement 2. Friction slows you down and causes heat.
Gestures and Device Motion. Introduction Everyone has their own way of picking up and putting down their device Holding and using the device can determine.
Advanced Physics Chapter 2 Describing Motion: Kinematics in One Dimension.
CPE 490/590 – Smartphone Development
CHAPTER 8 Sensors and Camera. Chapter objectives: Understand Motion Sensors, Environmental Sensors and Positional Sensors Learn how to acquire measurement.
Linear Motion Kinematics. Kinematics – how objects move Dynamics – why objects move.
Chapter 8 Sensors and Camera. Figure 08.01: The Accelerometer can gauge the orientation of a stationary device.
Motion. Mechanics – branch of physics dealing with the action of forces on objects and with the resulting motion.
Android Android Sensors Android Sensors: – Accelerometer – Gravity sensor – Linear Acceleration sensor – Magnetic Field sensor – Orientation.
MOTION IN ONE DIMENSION
Sensors in Android.
Vijay Kumar Kolagani Dr. Yingcai Xiao
Lecture 4: Sensors Topics: Motion, Position, and Environmental Sensors
Today: (Ch. 7) Momentum and Impulse Conservation of Momentum Collision.
Introduction to Smart Systems
Introduction & Rectilinear Kinematics:
Lecture 4: Sensors Topics: Motion, Position, and Environmental Sensors.
(Constant acceleration)
AP Physics C.
Vijay Kumar Kolagani Dr. Yingcai Xiao
CS499 – Mobile Application Development
Mobile Handset Sensors
Vijay Kumar Kolagani Dr. Yingcai Xiao
Inertial Measurement Unit (IMU) Basics
Warm-Up: Why are ice skates thin and sharp? (Question from last class).
Chapter 2 Table of Contents Section 1 Displacement and Velocity
1 Course Code: SECV1030 Course Name: Engineering Mechanics Module 1 : Static.
Forces and the Laws of Motion
Mobile Programming Sensors in Android.
rate at which velocity changes
Velocity vs Time Graphs – Notebooks
Device,Network, Vibration, Console, Accelerometer
Or What’s Our Vector Victor?
Presentation transcript:

Android Topics Sensors Accelerometer and the Coordinate System Accelerometer and Force Detecting Movement as a Gesture Explore a Shake motion In-class App: Shake!

Sensors Android devices come with a varied set of embedded sensors. Collectively, sensors enable the creation of applications across a wide range of domains, such as gaming and healthcare.

What is a Sensor A sensor is a component that can measure a physical quantity. Examples of Physical Measurements: Tilt of a device Sudden movement A sensor converts a physical measurement into a signal that can be interpreted by an application.

Typical Sensor touchscreens accelerometers gyroscopes cameras NOTE: A camera-based application is often enhanced by the use of an accelerometer. The orientation changes as the user rotates their device.

Accelerometer An accelerometer is a motion sensor. A motion event is registered when a user moves, shakes, or tilts a device. An accelerometer provides feedback based on the coordinate system.

Accelerometer and the Coordinate System The coordinate system of an Android device is defined relative to the screen of the device in its default orientation. For example, the default mode of an Android mobile phone is typically the portrait orientation. The x-axis runs in the direction of the short side of the screen. The y-axis runs in the direction of the long side of the screen and the z-axis points out of the screen.

Accelerometer and Force Force = Mass * Acceleration When the accelerometer measures a zero force, the device is either still or moving at a constant speed. When the acceleration of the device is increased, such as a quick jerk of the hand, the accelerometer registers an increase in force.

Accelerometer and Gravity The accelerometer can efficiently report the combined effect of gravity. It may be necessary to remove the impact of gravity from the accelerometer readings.

How does the Accelerometer works The accelerometer made up of three accelerometers, one for each axis— x, y, and z. Combining all three accelerometers lets you detect accelerated force in any direction. Detecting the forces applied to a device requires the collection of accelerated movement on all three axes. This movement is measured in meters per second squared. The linear acceleration can be converted into a g-force measurement by neutralizing gravity. SensorManager.GRAVITY_EARTH. To compute a directionless g-force measurement, the Pythagorean theorem can be applied to the different acceleration axes readings.

Explore a Shake Action in an App

How would you define a “shake” action? A “forceful” action with no specified direction. A period of rest that follows the force.

How is a Shake different from a Bump? Is the force a shake or an accidental movement of the device?

Shake vs. Bump Determine a threshold of force - trial and error. Compute the force and evaluate if it registers at or above the specified threshold.

Basic Shake Action App Considerations Detecting a shake motion requires the use of an accelerometer. Detecting this action requires a “uses feature” to be specified in the manifest file: <uses-feature> A shake action will be a directionless force.

Review: How will the app use the accelerometer? The accelerometer will measure acceleration force of the device. Acceleration force is the rate of change of the velocity of the device. Accelerometer will measure the force in meters per second squared (m/s 2 ).

Acceleration Forces Static? or Dynamic?

Static Acceleration Forces Acceleration forces may be static, like the constant force of gravity. By measuring the amount of static acceleration due to gravity, you can find out the angle the device is tilted at with respect to the earth.

Dynamic Acceleration Forces Acceleration forces may be dynamic – caused by moving or vibrating the accelerometer. By sensing the amount of dynamic acceleration, you can analyze the way the device is moving.

Detecting a Shake Action Gesture This action must produce a threshold of force equal to 22.0 (meters per second per second) The force will then be followed by a time lapse of 500 (milliseconds)

Collection of Sensor Values Axes values are retrieved from a sensor event array: X- axis force : sensorEvent.values[0] Y- axis force : sensorEvent.values[1] Z- axis force : sensorEvent.values[1]

Convert each accelerometer measurement into a G-Force Remove Earth’s gravity xForce = xForce - SensorManager.GRAVITY_EARTH yForce = yForce - SensorManager.GRAVITY_EARTH zForce = zForce - SensorManager.GRAVITY_EARTH

Compute Directionless Force xForce2 + yForce2 + zForce2 xForce2 + yForce2 + zForce2 xForce2 + yForce2 + zForce2

What is SensorEventListener? Explore the Android documentation.

What is SensorEventListener? Answer: An Interface

What Abstract methods are required for a SensorEventListener?

What Abstract methods are required for a SensorEventListener? onSensorChanged() onAccuracyChanged()

Complete the Lab 7 App Construct an app that toggles a lightbulb on and off when the user shakes or jerks their device. Lab 7 NOTE: Complete all exercises from Lab 7.