j
Course Content
Motor Driver Board
0/1
micro:bit in Hindi
About Lesson

Musical Dice Challenge

Watch the video below and create a similar musical dice using MakeCode for Micro:bit.

  1. When you shake the micro:bit a random number between 1 and 6 should get generated.
  2. You will need to store this number in a variable.
  3. Using nested conditionals (elif command), you will check what random number has been saved in the variable and then light up those many LEDs plus play those many beeps.

Solution is given in the next lesson but first do your best to write the programme yourself. It’s not difficult 🙂