Personal trainer with micro:bit
This challenge has been written by Álvaro Molina Ayuso and is part of the EU CODE WEEK CHALLENGES.
Target Audience
- Lower Secondary School students (12 to 16 years)
- Upper Secondary School students (16 to 18 years)
Experience
- Intermediate
Duration
- 30-40 minutes
Purpose
- To code micro:bit in order to use the buzzer and led panel
- To create a personal device to control your physical activity
- To code micro:bit to improve your health through sport
Recommended Materials
- micro:bit V2
Description
This challenge allows you to code your micro:bit to control the repetition times of physical exercises combined with rest time. You will track your physical activity at school, at home or in the park.
Instructions
- When A+B, create a 3-second countdown timer with a musical note sound every second and display the word GO!
- During the first exercise, display a flashing 2x2 square for 20 seconds. Then play a sound and keep the square fixed. During the remaining time, another flashing image must be displayed for 10 seconds. When it finished, play a sound.
- Then repeat the same action but display a 3x3 panel for the exercise time. Repeat these actions until the 5x5 panel is displayed.
Share the link to your work in your Instagram Bio: tap the Edit Profile button on your Instagram and add the link to your work in the Website field. After that, create a new post, add a screenshot of your work, write “Link in Bio”, add the hashtag #EUCodeWeekChallenge and mention @CodeWeekEU.
Example
Click here to download this challenge as a word document.
Copyright notice ©
The EU Code Week website for schools is a service supported by the European Commission
Except where stated otherwise, content made available on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license
Licensing under Creative Commons licenses does not of itself affect the ownership of the copyright
Content from third party websites is subject to their own copyright restrictions; please refer to the site of origin for more information.
The EU Code Week website for schools is a service supported by the European Commission
Except where stated otherwise, content made available on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license
Licensing under Creative Commons licenses does not of itself affect the ownership of the copyright
Content from third party websites is subject to their own copyright restrictions; please refer to the site of origin for more information.