Smart Home IoT Kit Lesson17: Tracing Human Movement
OSOYOO Smart Home IoT Learning Kit with MEGA2560 でつくるSmart Home Lesson17。
Lesson17: Tracing Human Movement
lession17.inoのWiFi書き換えてアップロード
色がチカチカ光り意味がわからないが、安定する位置で動作確認してみる。
White (透明) LEDはWebでは白くてstatusが見えない・・・
まず、色々試す。
Yellow LEDはWebもstatusが見えないので、反転。
距離は、
コードに2行加えてモニターする。
Serial.println(distance);
Serial.println(status_str);
↓こんな感じ。
17:47:39.529 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.567 -> 41
17:47:39.567 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.636 -> No object in range
17:47:39.669 -> 34
17:47:39.669 -> <font color=000000><b>No object in range</b></font>
17:47:39.707 -> 31
17:47:39.707 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.777 -> 31
17:47:39.777 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.813 -> 28
17:47:39.813 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.889 -> 27
17:47:39.889 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.959 -> 27
17:47:39.959 -> <font color=red><b>Object is Very Far</b></font>
17:47:39.993 -> 28
17:47:39.993 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.065 -> 28
17:47:40.065 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.102 -> 28
17:47:40.102 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.173 -> 28
17:47:40.173 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.209 -> 27
17:47:40.245 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.280 -> 26
17:47:40.280 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.317 -> 26
17:47:40.352 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.390 -> 26
17:47:40.390 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.462 -> 26
17:47:40.462 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.495 -> 26
17:47:40.495 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.562 -> 26
17:47:40.562 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.635 -> 26
17:47:40.635 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.671 -> 26
17:47:40.671 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.742 -> 26
17:47:40.742 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.776 -> 26
17:47:40.776 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.848 -> 26
17:47:40.848 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.882 -> 26
17:47:40.882 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.956 -> 26
17:47:40.956 -> <font color=red><b>Object is Very Far</b></font>
17:47:40.992 -> 25
17:47:41.026 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.061 -> 25
17:47:41.061 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.127 -> 24
17:47:41.127 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.164 -> 26
17:47:41.164 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.233 -> 22
17:47:41.233 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.305 -> 21
17:47:41.305 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.339 -> 21
17:47:41.339 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.411 -> 20
17:47:41.411 -> <font color=red><b>Object is Very Far</b></font>
17:47:41.445 -> 20
17:47:41.482 -> <font color=green><b>Object is far</b></font>
17:47:41.515 -> 19
17:47:41.515 -> <font color=green><b>Object is far</b></font>
17:47:41.553 -> 19
17:47:41.553 -> <font color=green><b>Object is far</b></font>
17:47:41.624 -> 19
17:47:41.624 -> <font color=green><b>Object is far</b></font>
17:47:41.659 -> 19
17:47:41.659 -> <font color=green><b>Object is far</b></font>
17:47:41.727 -> 19
17:47:41.727 -> <font color=green><b>Object is far</b></font>
17:47:41.764 -> 18
17:47:41.764 -> <font color=green><b>Object is far</b></font>
17:47:41.837 -> 18
17:47:41.837 -> <font color=green><b>Object is far</b></font>
17:47:41.870 -> 18
17:47:41.870 -> <font color=green><b>Object is far</b></font>
17:47:41.940 -> 18
17:47:41.940 -> <font color=green><b>Object is far</b></font>
17:47:41.976 -> 18
17:47:41.976 -> <font color=green><b>Object is far</b></font>
17:47:42.048 -> 18
17:47:42.048 -> <font color=green><b>Object is far</b></font>
17:47:42.085 -> 18
17:47:42.085 -> <font color=green><b>Object is far</b></font>
17:47:42.155 -> 18
17:47:42.155 -> <font color=green><b>Object is far</b></font>
17:47:42.192 -> 18
17:47:42.192 -> <font color=green><b>Object is far</b></font>
17:47:42.261 -> 18
17:47:42.261 -> <font color=green><b>Object is far</b></font>
17:47:42.300 -> 18
17:47:42.300 -> <font color=green><b>Object is far</b></font>
17:47:42.368 -> 18
17:47:42.368 -> <font color=green><b>Object is far</b></font>
17:47:42.405 -> 18
17:47:42.405 -> <font color=green><b>Object is far</b></font>
17:47:42.477 -> 18
17:47:42.477 -> <font color=green><b>Object is far</b></font>
17:47:42.511 -> 18
17:47:42.511 -> <font color=green><b>Object is far</b></font>
17:47:42.583 -> 18
17:47:42.583 -> <font color=green><b>Object is far</b></font>
17:47:42.621 -> 18
17:47:42.621 -> <font color=green><b>Object is far</b></font>
17:47:42.691 -> 18
17:47:42.691 -> <font color=green><b>Object is far</b></font>
17:47:42.725 -> 18
17:47:42.725 -> <font color=green><b>Object is far</b></font>
17:47:42.798 -> 18
17:47:42.798 -> <font color=green><b>Object is far</b></font>
17:47:42.833 -> 18
17:47:42.833 -> <font color=green><b>Object is far</b></font>
17:47:42.904 -> 17
17:47:42.904 -> <font color=green><b>Object is far</b></font>
17:47:42.939 -> 17
17:47:42.939 -> <font color=green><b>Object is far</b></font>
17:47:43.010 -> 17
17:47:43.010 -> <font color=green><b>Object is far</b></font>
17:47:43.047 -> 17
17:47:43.047 -> <font color=green><b>Object is far</b></font>
17:47:43.117 -> 17
17:47:43.117 -> <font color=green><b>Object is far</b></font>
17:47:43.155 -> 17
17:47:43.155 -> <font color=green><b>Object is far</b></font>
17:47:43.227 -> 16
17:47:43.227 -> <font color=green><b>Object is far</b></font>
17:47:43.261 -> 15
17:47:43.261 -> <font color=green><b>Object is far</b></font>
17:47:43.334 -> 15
17:47:43.334 -> <font color=green><b>Object is far</b></font>
17:47:43.368 -> 14
17:47:43.368 -> <font color=green><b>Object is far</b></font>
17:47:43.436 -> 14
17:47:43.436 -> <font color=green><b>Object is far</b></font>
17:47:43.474 -> 13
17:47:43.474 -> <font color=green><b>Object is far</b></font>
17:47:43.547 -> 12
17:47:43.547 -> <font color=green><b>Object is far</b></font>
17:47:43.584 -> 13
17:47:43.584 -> <font color=green><b>Object is far</b></font>
17:47:43.620 -> 10
17:47:43.653 -> <font color=green><b>Object is far</b></font>
17:47:43.691 -> 10
17:47:43.691 -> <font color=yellow><b>Object is close</b></font>
17:47:43.764 -> 10
17:47:43.764 -> <font color=yellow><b>Object is close</b></font>
17:47:43.802 -> 10
17:47:43.802 -> <font color=yellow><b>Object is close</b></font>
17:47:43.875 -> 10
17:47:43.875 -> <font color=yellow><b>Object is close</b></font>
17:47:43.913 -> 9
17:47:43.913 -> <font color=yellow><b>Object is close</b></font>
17:47:43.981 -> 9
17:47:43.981 -> <font color=yellow><b>Object is close</b></font>
17:47:44.018 -> 8
17:47:44.018 -> <font color=yellow><b>Object is close</b></font>
17:47:44.090 -> 8
17:47:44.090 -> <font color=yellow><b>Object is close</b></font>
17:47:44.159 -> 8
17:47:44.159 -> <font color=yellow><b>Object is close</b></font>
17:47:44.196 -> 8
17:47:44.196 -> <font color=yellow><b>Object is close</b></font>
17:47:44.268 -> 9
17:47:44.268 -> <font color=yellow><b>Object is close</b></font>
17:47:44.305 -> 9
17:47:44.305 -> <font color=yellow><b>Object is close</b></font>
17:47:44.376 -> 10
17:47:44.376 -> <font color=yellow><b>Object is close</b></font>
17:47:44.414 -> 10
17:47:44.414 -> <font color=yellow><b>Object is close</b></font>
17:47:44.486 -> 9
17:47:44.486 -> <font color=yellow><b>Object is close</b></font>
17:47:44.521 -> 10
17:47:44.555 -> <font color=yellow><b>Object is close</b></font>
17:47:44.593 -> 10
17:47:44.593 -> <font color=yellow><b>Object is close</b></font>
17:47:44.660 -> 10
17:47:44.660 -> <font color=yellow><b>Object is close</b></font>
17:47:44.695 -> 11
17:47:44.695 -> <font color=yellow><b>Object is close</b></font>
17:47:44.766 -> 12
17:47:44.766 -> <font color=green><b>Object is far</b></font>
17:47:44.803 -> 11
17:47:44.839 -> <font color=green><b>Object is far</b></font>
17:47:44.875 -> 13
17:47:44.875 -> <font color=green><b>Object is far</b></font>
17:47:44.910 -> 13
17:47:44.946 -> <font color=green><b>Object is far</b></font>
17:47:44.984 -> 14
40以上 (no object)
20以上 Red (Object is Very Far)
10以上 Green (Object is far)
5以上 Yellow (Object is close)
それ以下 White (Object is Very close)
で、動いているかな。
このSmart Home KitoはAmazonで買いました。