File tree 1 file changed +43
-4
lines changed
1 file changed +43
-4
lines changed Original file line number Diff line number Diff line change 1
1
# 📌 가속도 센서
2
2
3
- ### ✔ 연결방법
3
+ - tap, doubletap, freefall
4
4
5
+ - 라이브러리
5
6
6
- < br >< br >
7
+ ### ✔ 연결방법
7
8
8
- ### ✔
9
+ ![ image ] ( https://user-images.githubusercontent.com/54584063/84302074-be52ec80-ab8f-11ea-9479-5a40eb6adff9.png )
9
10
10
11
11
12
<br ><br >
12
13
13
14
### ✔ LAB
14
15
16
+ - 가속도 센서 : tap , doubletap, freefall
17
+
18
+ http://adam-meyer.com/arduino/ADXL345
19
+
20
+ - 예제 코드 가져오기
21
+
22
+ - loop에 넣기
23
+
24
+ ``` js
25
+ // read interrupts source and look for triggerd actions
26
+ byte interrupts = adxl .getInterruptSource ();
27
+
28
+ // tap
29
+ if (adxl .triggered (interrupts, ADXL345_SINGLE_TAP ))
30
+ Serial .println (" tap" );
31
+
32
+ // double tap
33
+ if (adxl .triggered (interrupts, ADXL345_DOUBLE_TAP ))
34
+ Serial .println (" double tap" );
35
+
36
+ // freefall
37
+ if (adxl .triggered (interrupts, ADXL345_FREE_FALL ))
38
+ Serial .println (" freefall" );
39
+
40
+ // inactivity
41
+ if (adxl .triggered (interrupts, ADXL345_INACTIVITY ))
42
+ Serial .println (" inactivity" );
43
+
44
+ // activity
45
+ if (adxl .triggered (interrupts, ADXL345_ACTIVITY ))
46
+ Serial .println (" activity" );
47
+ ```
15
48
16
49
17
50
< br>< br>
18
51
19
- ### 🔎 정리
52
+ ### 🔎 정리
53
+
54
+ - 가속도 센서
55
+
56
+ - x,y,z 축 가속도를 측정하는 센서
57
+
58
+ - 움직임, 충격 등 다양한 동작 인식에 활용
You can’t perform that action at this time.
0 commit comments