활동

Kick strength data logger

중급 | MakeCode | 가속도 센서, 데이터 로깅 | 과학적으로 일하기, 데이터 처리, 불 논리, 센서, 정보 다루기, 측정, 통계 & 그래프

1단계: 만들어 보세요.

프로젝트 소개

Use your BBC micro:bit to improve your game by collecting sports science data on the strength of kicks or racket strokes.

설명

This project uses the micro:bit’s accelerometer sensor and data logging feature to log and store data on how hard you kick a ball, or hit a racket, over a short period of time. You can then study the data on a computer to improve your consistency or performance over time, in the same way sports professionals use data science to help improve their performance.

Collecting data

• Put the code on a micro:bit V2 and attach a battery pack. When you’re ready to collect data, tuck it inside your sock (or strap it to your wrist.)
• Press button A to start logging data. The display shows a tick (check mark).
• Try some different types of moves over a short period of time. For example, spend a couple of minutes taking three penalty kicks, then make three passes.
• If you see a cross on the display, that means the micro:bit was accidentally reset. Delete the old data by touching the logo, and at the same time hold down button A and press button B. Then press button A to start logging again.
• Unplug the battery pack when you’ve finished collecting data.

Analysing the data

Plug the micro:bit into a computer’s USB socket.

Look for the MICROBIT drive on the computer. Double click on the MY_DATA file to see your data in a web browser. Then click on ‘Visual preview’ to view your data on a graph.

The graph shows time along the X axis and the strength of acceleration in the Y axis. This is measured in milli G. The larger the number on the Y axis, the more acceleration that was measured and the stronger your kick.

Can you identify your three penalty kicks and your three passes? Was your strongest kick your most accurate? You could compare your performance and consistency over time, or with other players.

You can download the code from this page and use it straight away. Or, if you want to code the kick strength data logger yourself, watch the coding video above.

준비물

• micro:bit V2 and battery pack
• computer and micro USB cable for coding the micro:bit and viewing your data
• our data logging guide may be useful