­
Personal Trainer – Build Your Fitness App
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
  1. Lower Secondary School students (12 to 16 years)
  2. Upper Secondary School students (16 to 18 years)
Experience
  1. Intermediate
Duration
  1. 30-40 minutes
Purpose
  1. To code micro:bit in order to use the buzzer and led panel
  2. To create a personal device to control your physical activity
  3. To code micro:bit to improve your health through sport
Recommended Materials
  1. 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.
SettingsRequest history74.83msRequest Duration3MBMemory Usage11.x
Laravel Version
11.44.2
PHP Version
8.3.9
Environment
test
Debug Mode
Enabled
URL
dev.codeweek.eu
Timezone
UTC
Locale
en
GET challenges/personal-trainer
status
200 OK
full_url
https://dev.codeweek.eu/challenges/personal-trainer
action_name
challenges.personal-trainer
controller_action
\Illuminate\Routing\ViewController
Theme
Open Button Position
Hide Empty Tabs
Autoshow
Reset to defaults
    status
    200 OK
    full_url
    https://dev.codeweek.eu/challenges/personal-trainer
    action_name
    challenges.personal-trainer
    controller_action
    \Illuminate\Routing\ViewController
    uri
    GET challenges/personal-trainer
    controller
    \Illuminate\Routing\ViewController
    prefix
    /challenges
    middleware
    web
    duration
    74.83ms
    peak_memory
    6MB
    response
    text/html; charset=UTF-8
    request_format
    html
    request_query
    []
    
    request_request
    []
    
    request_headers
    0 of 0
    array:15 [ "priority" => array:1 [ 0 => "u=0, i" ] "accept-encoding" => array:1 [ 0 => "gzip, deflate, br, zstd" ] "sec-fetch-dest" => array:1 [ 0 => "document" ] "sec-fetch-user" => array:1 [ 0 => "?1" ] "sec-fetch-mode" => array:1 [ 0 => "navigate" ] "sec-fetch-site" => array:1 [ 0 => "none" ] "accept" => array:1 [ 0 => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" ] "user-agent" => array:1 [ 0 => "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)" ] "upgrade-insecure-requests" => array:1 [ 0 => "1" ] "sec-ch-ua-platform" => array:1 [ 0 => ""Windows"" ] "sec-ch-ua-mobile" => array:1 [ 0 => "?0" ] "sec-ch-ua" => array:1 [ 0 => ""HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"" ] "cache-control" => array:1 [ 0 => "no-cache" ] "pragma" => array:1 [ 0 => "no-cache" ] "host" => array:1 [ 0 => "dev.codeweek.eu" ] ]
    request_cookies
    []
    
    response_headers
    0 of 0
    array:3 [ "cache-control" => array:1 [ 0 => "no-cache, private" ] "date" => array:1 [ 0 => "Sat, 05 Apr 2025 22:39:24 GMT" ] "content-type" => array:1 [ 0 => "text/html; charset=UTF-8" ] ]
    session_attributes
    0 of 0
    array:2 [ "_token" => "AnPuURSE9cc47ZWGtcBoCVxZV322aXao2VDwvuGM" "locale" => "en" ]
    • Booting (63.02ms)time
    • Application (11.79ms)time
    • Routing (2.68ms)
    • View: 2021.challenges.personal-trainerviews
    • View: components.tailwindviews
    • View: 2021.challenges._authorviews
    • View: 2021.challenges._shareviews
    • View: 2021.challenges._downloadviews
    • View: include.licenceviews
    • View: layout.baseviews
    • View: layout.menuviews
    • View: layout.footerviews
    • View: scripts.countdownviews
    • Preparing Response (60μs)
    • 1 x Booting (84.22%)
      63.02ms
      1 x Application (15.76%)
      11.79ms
      1 x Routing (3.58%)
      2.68ms
      1 x Preparing Response (0.08%)
      60μs
      10 x View (0%)
      0μs
      10 templates were rendered
      • 2021.challenges.personal-trainerpersonal-trainer.blade.php#?blade
      • components.tailwindtailwind.blade.php#?blade
      • 2021.challenges._author_author.blade.php#?blade
      • 2021.challenges._share_share.blade.php#?blade
      • 2021.challenges._download_download.blade.php#?blade
      • include.licencelicence.blade.php#?blade
      • layout.basebase.blade.php#?blade
      • layout.menumenu.blade.php#?blade
      • layout.footerfooter.blade.php#?blade
      • scripts.countdowncountdown.blade.php#?blade
      0 statements were executed0μs
            ClearShow all
            Date ↕MethodURLData
            #12025-04-05 22:39:24GET/challenges/personal-trainer10