Arduino

ㅁ조깅화를 이용한 운동량 체크

ElectricShock 2019. 9. 11. 15:40


의뢰는 instructables.tistory.com/64로 방문해주세요



ㅊㄴㄷ --- ㅈㄱㄱㅎㄱ


압전소자를 이용한 운동량 체크


(▼학생들이 전달해준 공식)

몸무게 X 운동시간 X MET계수



에미트계수

3km/h = 1.8

5km/h = 3.2

7km/h = 5.3

9km/h = 8.8

11km/h = 11.2

13km/h = 12.9

15km/h = 14.6




센서를 한번 누를때마다 한걸음

보폭을 1m라고 Fix시킨다면

3km/h 속도일경우 1시간동안 3000번 가량 센서를 누르게된다.

운동시간이 1시간으로 고정된경우 센서가 눌린 횟수를 카운하면된다.

But

운동시간 또한 변수로 작용한다면 비교기를 써야할 수도 있다. (▶LINK)









http://appinventor.mit.edu/explore/ai2/setup-device-usb

아래 QR Code를 읽어서 앱을 다운받아야  App Inventor에서 완성된후 생성되는 apk를 다운받을 수 있다.



▼아래 바코드를 읽어들이면 App이 다운로드된다.

단 2시간동안만 유효하므로 댓글로 갱신해달라고 요청해주세요





https://www.youtube.com/watch?v=EzavOUMpdPM

타이머


https://www.youtube.com/watch?time_continue=184&v=Vdo8UdkgDD8

영어로 메세지 읽게끔하기


https://www.youtube.com/watch?v=xjtxrxVauZg

Arduino값을 받아와서 App에 표시하기



▼블루투스 기본 코드

https://roboindia.com/tutorials/sending-receiving-with-hc05-mit-app-inventor/



https://www.electronoobs.com/eng_arduino_tut20.php

블루투스를 통해 데이터 읽어들이기

Now we add the code blocks. 

First we add the blocks for the list picker. 

When selected we open the list of Bluetooth devices. 

After that we select the device we connect.

In the bottom blocs each time the timer will loop, in this case 100ms, we first check if there is a bluetooth connection. If yes, we check if there is data comming thoards the smartphone. If yes then we set the text of the middle label to the received data. That's it. Now click build and save the app. Copy it to your smartphone and install. Make sure to enable unknown origin app in your smartphone settings.

http://ai2.appinventor.mit.edu/reference/components/userinterface.html#TextBox

▲Text Box에 값을 넣고싶을땐 Focus ON을 해줘야한다.