11. SCase 09: Countdown

11.1. Purpose


  • Use the Smart Coding Kit to create a countdown machine.

11.2. Material


  • 1 x smart coding kit

../../_images/smart_coding_kit_case_09_01.png

11.3. Software


MicroSoftmakecode

11.4. Programming


  • Show the icon while on start and set the variable i as 9.

  • While button A being pressed, set the variable i as 9.

  • While button B being pressed, start the countdown and display the icon when it comes to 0.

    ../../_images/smart_coding_kit_case_09_02.png

11.5. Result


  • Show the icon while on start

  • While button A being pressed, the number 9 displays on the micro:bit

  • While button B being pressed, the countdown starts and number 0 displays on the micro:bit

11.6. Exploration


11.7. FAQ


11.8. Relevant File