Magic 8

Uses

LED Display, accelerometer

Description

In this challenge you will make a Magic 8, a toy invented in the 1950’s, where you ask a question to the microbit, and will generate a randomly generated answer.

../../_images/magic8.jpg

Print a message to ask a question, then shaking the microbit will print a randomly generated answer from the list. To add suspense, you need to add a 2000ms (2 seconds) delay after shaking and showing the answer.

Basic Game

  1. Display a message to ask a question.
  2. Create a list of possible answers to the questions. Example: “certainly so”, “definetly not”.
  3. When shake is detected, it will randomly select among the list of answers.
  4. Add a 2000ms delay to create excitement. You can add an animation on the screen while delay is executed
  5. Print out the answer.