-: In this lesson,
we are going to talk about mobile device components.
Specifically, we're going to be talking about digitizers,
accelerometers, and gyroscopes.
First, we have a digitizer.
A digitizer is a layer sandwiched between a layer
of protective glass and the display panel,
inside of a touchscreen display.
This digitizer is going to be able to convert
the analog touch input
to the digital software instructions
that are used by the underlying applications
and operating system.
Anytime you touch your display on a smartphone or tablet,
you're using the digitizer to send those inputs.
Digitizers come as both capacitive
and multitouch variants that will allow you
to use either one finger or multiple fingers
to be able to send commands to that display
using the digitizer.
In addition to the touch capability,
a lot of these digitizers and screens
also provide a way to provide haptic feedback
to the end user.
For example, on my iPhone,
when I use the keyboard on the screen,
it actually gives me a little vibration
to let me know that I've actually touched
that particular key as I'm typing out things.
This is what is known as haptic feedback,
and it provides a form of touch responsiveness
from the display back to the end user,
who's actually typing on it
and using it to input information into the system.
Now, when you're looking at the touchscreen itself,
this digitizer has to be protected.
And so, the digitizer has a piece of glass put on top of it.
In most modern systems, this is going to be using some form
of really strong glass like Gorilla Glass.
This is a scratch-resistant shock-resistant
type of temper glass that'll protect the digitizer
and the underlying liquid crystals
that are in that particular display.
Next, we have the accelerometer.
Now, the accelerometer is a combination device
that uses hardware and software
to measure the velocity, rotation,
and shaking of that mobile device.
Now, the accelerometer really focuses on movement
caused by gravity or vibration, or by a quick acceleration.
For example, if I take my smartphone, and I move it with me
as I'm swinging my arm, it can detect the fact
that I have that forward momentum happening,
and it can detect how fast that's happening.
Now, why would you want to use an accelerometer?
Well, there's a lot of reasons we use accelerometers
in our mobile devices, but the most common one
is for our screen orientation.
If you pick up your phone to take a picture,
and you're holding it upright in a vertical format,
you're going to only be able to see things that are tall,
like a building.
But if you turn it to the side,
and now it's in a horizontal format,
your screen also turns to the side too.
Well, it's the accelerometer
that's doing that for you.
The accelerometer is able to detect the motion
of going from that vertical orientation
into the horizontal orientation,
and it sends that signal to the operating system
to change the display that's being output,
to accommodate for that.
In addition to this, you'll also find accelerometers
inserted into a lot of laptops.
The reason for this is that if your laptop
has a traditional hard drive, and you drop it,
that hard drive could be damaged really badly
if it was in the middle of reading or writing data,
because the actuator arm can scratch the surface
of the hard drive's platters.
But if your laptop has an accelerometer,
and it detects that it's being dropped,
it can send a signal to the hard drive to park the actuator,
and make it so that the actuator stops reading and writing
from the hard drive during the fall.
And this can prevent data loss on that drive
during the drop.
Now, the accelerometer is pretty helpful,
and can be used in games as well.
For example, if I wanted to take my iPhone
and play a driving game,
I can turn the device left and right,
and it will be able to detect that turn,
and then turn the car in the game.
This is another way you can use the accelerometer
with different applications on your smartphone,
to take that physical real world input,
and then use that to control what's happening
inside that application.
Now, an accelerometer works really well
when you're dealing with the X and Y axis,
which is the horizontal and vertical axis,
but it does not do a good job
if you start moving things forward and backwards,
which is known as depth.
This is our Z axis.
To be able to add Z, we need to add something
known as the gyroscope.
Now, a gyroscope is essentially an improved version
of the basic accelerometer.
When you use a gyroscope, you can detect pitch,
roll, and yaw, and this allows you to control movements
in three dimensions, using the X, Y, and Z axis.
So, if I'm playing a car game, being able to move the phone
to the left or the right, that is fine,
and I can detect that using just the accelerometer,
using the X and Y axis.
But if I'm playing a flight simulator,
I also need to be able to pull the phone closer to me,
or away from me, to make my plane go up or down.
And so, if you want a realistic flying game,
you're going to need to measure the rate of rotation
around the X, Y, and Z axis,
and you can do that using a gyroscope.
Similarly, if you've ever explored a 3D photo or video
on your phone, you're using the gyroscope
to move yourself around that space,
and be able to see exactly what's going on
in all 360 degrees,
because you're moving across the X, Y, and Z axis.
Now, in addition to using this
for games, and looking at videos and photos,
you can also use it to perform actions on your phone.
In most modern smartphones,
there is adaptive technology inside of them
that pairs with software in the operating system
to allow you to do things like gestures.
For example, you could configure your smartphone
that, every time you shake it three times,
it's going to randomly shuffle your music and pick a new song.
Or you might make it that if you shake the phone
left to right, it's going to hang up or decline a phone call
that's coming in for you.
All these are things that are made possible
by using that gyroscope inside of your smartphone.
The final thing we use our gyroscope for
is image stabilization.
A lot of our camera apps inside of our smartphone
actually pair themself with the gyroscope,
and they use this as a way to detect
what motion is happening with the camera,
and to counteract that using digital filters,
to be able to give us clear photos and videos
with less vibrations and less shaking.
These are all benefits of using a gyroscope
inside of your smartphone.
So, keep in mind, when it comes to mobile devices,
there are three main components that you should be aware of,
and their function.
This is the digitizer, the accelerometer, and the gyroscope.
When it comes to a digitizer,
this is all about taking your tactile input,
and converting it to digital signals
that can be understood by the operating system.
When it comes to the accelerometer,
we are measuring the speed of change
along the X and Y axis, which is horizontal and vertical.
And if we use a gyroscope, we are adding the Z axis to this,
So we can see things in 360 degrees,
going across the horizontal or X axis,
the Y axis or vertical access, and the Z axis
or the depth axis.