# case 02:Dice ## Our Goal --- - Use watch kit to make a wearable dice. ## Material Needed --- - 1 x Watch kit ## Hardware Connection --- Asmmble our watch kit directly just like the picture below. ![](./images/vOZpBF4.jpg) ## Software --- [Microsoft Makecode](https://makecode.microbit.org/#) ## Programming --- ### Step 1 - Drag out an `on shake` block from `input`. - Create a variable `num` and assign value to this variable with a random number among 0 to 5. - Insert a `if` block. When the random number picked is 0, then display one point. If the random number is 2, then display two points. And so on. ![](./images/o0VecJj.png) ### Program - The link of the whole program: [https://makecode.microbit.org/_fdYbizRa3VW4](https://makecode.microbit.org/_fdYbizRa3VW4) - You can also download the program from the page below.
## Result --- - Every time when we shake our micro:bit, a random number is created. ## Think --- ## FAQ --- ## Relative Readings ---