1
00:00:00,780 --> 00:00:08,490
The next lesson is lessons for Project two here we'll be tackling on classifying hand gestures with

2
00:00:08,520 --> 00:00:12,900
accelerometer specifically for theory and data collection.

3
00:00:13,470 --> 00:00:19,200
Now during this lesson, we'll do the same thing as before, but we'll use a different sensor for that

4
00:00:20,010 --> 00:00:22,140
a three axis accelerometer.

5
00:00:22,800 --> 00:00:28,590
Now this is a hard problem to solve with rule based programming because people don't always make the

6
00:00:28,590 --> 00:00:31,650
same gestures the same way every time they do it.

7
00:00:32,070 --> 00:00:36,420
But machine learning can handle these different types of things very well.

8
00:00:36,990 --> 00:00:46,800
Now you might be able to figure out from the name that accelerometers are devices that measures acceleration,

9
00:00:47,400 --> 00:00:50,070
which is how quickly an object moves.

10
00:00:50,430 --> 00:00:57,540
Now they use meters per second squared or G-forces or gravity forces to figure out how fast they move.

11
00:00:58,230 --> 00:01:03,480
A single G-force is the same as 9.8 meters per second squared.

12
00:01:04,380 --> 00:01:08,550
As with other sensors, there are different types of accelerometers.

13
00:01:09,030 --> 00:01:13,920
The first ones were mechanical, and they were used to measure how fast things move.

14
00:01:13,980 --> 00:01:21,180
Now, a theory that the first accelerometer was actually called Atwood Machine and was invented by the

15
00:01:21,180 --> 00:01:23,580
English physicist George Atwood.

16
00:01:24,270 --> 00:01:30,900
Now, the micro electromechanical accelerometers are actually used in both your phone and radio terminology,

17
00:01:31,380 --> 00:01:35,820
and they measure how fast your phone in real terminal move will.

18
00:01:35,820 --> 00:01:40,650
Terminal has a module called three axis digital accelerometer.

19
00:01:40,740 --> 00:01:43,140
This is the exact one used in the terminal.

20
00:01:43,620 --> 00:01:51,570
The S3 DHT are usually accelerometers have the capacity plates inside of them.

21
00:01:52,050 --> 00:01:55,470
As the sensor moves, a small spring inside moves with them.

22
00:01:55,890 --> 00:02:03,120
Some of these are fixed, but others are attached to the tiny springs that move inside as acceleration

23
00:02:03,120 --> 00:02:04,530
forces work against them.

24
00:02:04,970 --> 00:02:12,840
Now in preparation, open Arduino IDE and make sure you have accelerometer libraries installed to instantly

25
00:02:12,840 --> 00:02:15,450
access digital accelerometer libraries.

26
00:02:16,080 --> 00:02:17,970
First, visit the seat.

27
00:02:18,270 --> 00:02:25,170
How do we know the Flight S3, the HDR repositories and download the entire repository to your long

28
00:02:25,190 --> 00:02:25,500
drive?

29
00:02:26,300 --> 00:02:31,290
Second, the LSD HDR can be installed through the Arduino.

30
00:02:31,290 --> 00:02:40,950
It opened the Arduino I.D. and then click sketch and then look out for include library and add zip library

31
00:02:40,950 --> 00:02:43,770
and choose the See Arduino.

32
00:02:45,150 --> 00:02:51,870
The HDR file that you just have downloaded now, the Edge Impulse Dashboard is where you can start a

33
00:02:51,870 --> 00:02:53,730
new project and add it to the list.

34
00:02:54,240 --> 00:02:57,900
Accelerometer data has three data samples in each data bucket.

35
00:02:58,260 --> 00:03:03,840
We need to sample it faster than we did it with the light sensor, so we need to increase the frequency

36
00:03:03,840 --> 00:03:09,270
to sixty two point five hertz or three times faster than we did with the light sensor.

37
00:03:09,660 --> 00:03:16,350
It means that we can't use the data for we do to get the data, and we'll have to use specific framework

38
00:03:16,350 --> 00:03:18,900
to get the data in order to do that.

39
00:03:19,080 --> 00:03:21,060
Connect real terminal to your PC.

40
00:03:21,540 --> 00:03:26,310
It's like the power switch twice quickly to get into the bootloader moment.

41
00:03:27,060 --> 00:03:33,480
Next is an external drive named Arduino should appear in your PC, then download the firmware for data

42
00:03:33,480 --> 00:03:42,060
collection here and impulse you have to film files then dragged downloaded to the Arduino Drive now

43
00:03:42,330 --> 00:03:43,720
edge impulse data collection.

44
00:03:43,720 --> 00:03:45,690
FEMA is loaded on wheels terminal.

45
00:03:46,260 --> 00:03:52,890
Once you uploaded the film ready to view terminal, make sure to run edge impossibly more clean in command

46
00:03:52,890 --> 00:03:56,340
prompt and log in with your edge impos credentials.

47
00:03:57,270 --> 00:04:00,570
Clean Command, clean your credentials and project name.

48
00:04:01,050 --> 00:04:04,470
Now you are ready to receive data in Edge Impulse Dashboard.

49
00:04:05,640 --> 00:04:09,500
Go to Data Acquisition tab and you should see your device there.

50
00:04:10,680 --> 00:04:13,470
On-The-Record new data select your device.

51
00:04:13,740 --> 00:04:18,300
Set the label to shake the sample to 10000.

52
00:04:18,900 --> 00:04:23,400
The sensor two built in accelerometer and frequency to sixty two point five hertz.

53
00:04:23,850 --> 00:04:30,030
Now this indicates that you want to record data for 10 seconds and labeled the recorded data as cheap.

54
00:04:30,570 --> 00:04:32,730
You can later added this labels if needed.

55
00:04:33,510 --> 00:04:40,070
Now, after you click start sampling, shake your device up and down inside to site in a continuous

56
00:04:40,080 --> 00:04:46,690
motion in about 12 seconds, the device should complete sampling and upload the file back to you.

57
00:04:46,720 --> 00:04:52,230
Once you see a new line, appear under collected data in the studio.

58
00:04:52,830 --> 00:05:00,180
When you click it, you now see the raw data graph out and as the accelerometer on the development board.

59
00:05:00,320 --> 00:05:01,250
Has three axis.

60
00:05:02,150 --> 00:05:05,990
You'll notice these three different lines, one for each axis.

61
00:05:06,710 --> 00:05:09,740
There must be a lot of detail for machine learning to work well.

62
00:05:10,070 --> 00:05:14,570
So a single sample will do the job starting to build your own dataset.

63
00:05:14,600 --> 00:05:16,490
Now is the best time to do it.

64
00:05:16,700 --> 00:05:24,290
As an example, you could record about three minutes of data per class, such as idle or even just sitting

65
00:05:24,290 --> 00:05:29,870
on your desk while you're working or three during device similar to how you would evolve.

66
00:05:30,500 --> 00:05:34,580
Then we weaving here is the device from left to right.

67
00:05:34,970 --> 00:05:38,540
Sheet, on the other hand, is moving the device up and down.

68
00:05:39,260 --> 00:05:44,660
Now it is important to take note to make sure to perform variations on the motions.

69
00:05:44,720 --> 00:05:49,460
Example do both slow and fast movements and varied the orientation of the board.

70
00:05:50,150 --> 00:05:52,970
You'll never know how your users will use the device.

71
00:05:53,420 --> 00:06:00,710
It's best to collect samples of each of 10 seconds each and then after that, gather data from two other

72
00:06:00,710 --> 00:06:02,150
people except for yourself.
