The next lesson is lessons for Project two here we'll be tackling on classifying hand gestures with
accelerometer specifically for theory and data collection.
Now during this lesson, we'll do the same thing as before, but we'll use a different sensor for that
a three axis accelerometer.
Now this is a hard problem to solve with rule based programming because people don't always make the
same gestures the same way every time they do it.
But machine learning can handle these different types of things very well.
Now you might be able to figure out from the name that accelerometers are devices that measures acceleration,
which is how quickly an object moves.
Now they use meters per second squared or G-forces or gravity forces to figure out how fast they move.
A single G-force is the same as 9.8 meters per second squared.
As with other sensors, there are different types of accelerometers.
The first ones were mechanical, and they were used to measure how fast things move.
Now, a theory that the first accelerometer was actually called Atwood Machine and was invented by the
English physicist George Atwood.
Now, the micro electromechanical accelerometers are actually used in both your phone and radio terminology,
and they measure how fast your phone in real terminal move will.
Terminal has a module called three axis digital accelerometer.
This is the exact one used in the terminal.
The S3 DHT are usually accelerometers have the capacity plates inside of them.
As the sensor moves, a small spring inside moves with them.
Some of these are fixed, but others are attached to the tiny springs that move inside as acceleration
forces work against them.
Now in preparation, open Arduino IDE and make sure you have accelerometer libraries installed to instantly
access digital accelerometer libraries.
First, visit the seat.
How do we know the Flight S3, the HDR repositories and download the entire repository to your long
drive?
Second, the LSD HDR can be installed through the Arduino.
It opened the Arduino I.D. and then click sketch and then look out for include library and add zip library
and choose the See Arduino.
The HDR file that you just have downloaded now, the Edge Impulse Dashboard is where you can start a
new project and add it to the list.
Accelerometer data has three data samples in each data bucket.
We need to sample it faster than we did it with the light sensor, so we need to increase the frequency
to sixty two point five hertz or three times faster than we did with the light sensor.
It means that we can't use the data for we do to get the data, and we'll have to use specific framework
to get the data in order to do that.
Connect real terminal to your PC.
It's like the power switch twice quickly to get into the bootloader moment.
Next is an external drive named Arduino should appear in your PC, then download the firmware for data
collection here and impulse you have to film files then dragged downloaded to the Arduino Drive now
edge impulse data collection.
FEMA is loaded on wheels terminal.
Once you uploaded the film ready to view terminal, make sure to run edge impossibly more clean in command
prompt and log in with your edge impos credentials.
Clean Command, clean your credentials and project name.
Now you are ready to receive data in Edge Impulse Dashboard.
Go to Data Acquisition tab and you should see your device there.
On-The-Record new data select your device.
Set the label to shake the sample to 10000.
The sensor two built in accelerometer and frequency to sixty two point five hertz.
Now this indicates that you want to record data for 10 seconds and labeled the recorded data as cheap.
You can later added this labels if needed.
Now, after you click start sampling, shake your device up and down inside to site in a continuous
motion in about 12 seconds, the device should complete sampling and upload the file back to you.
Once you see a new line, appear under collected data in the studio.
When you click it, you now see the raw data graph out and as the accelerometer on the development board.
Has three axis.
You'll notice these three different lines, one for each axis.
There must be a lot of detail for machine learning to work well.
So a single sample will do the job starting to build your own dataset.
Now is the best time to do it.
As an example, you could record about three minutes of data per class, such as idle or even just sitting
on your desk while you're working or three during device similar to how you would evolve.
Then we weaving here is the device from left to right.
Sheet, on the other hand, is moving the device up and down.
Now it is important to take note to make sure to perform variations on the motions.
Example do both slow and fast movements and varied the orientation of the board.
You'll never know how your users will use the device.
It's best to collect samples of each of 10 seconds each and then after that, gather data from two other
people except for yourself.