microbit fidget spinner

fidget spinner.doc

Code

We looked at two ways to create a microbit fidget spinner using


Pick a language ( if you are a beginner use Javablocks. )

follow the example and then look at the challenges


If we pick python, we have included speech

Challenges

  • Change if you need to how the fignet spinner gathers speed from shake to Button A
  • Set button B to stop the spinner ( hint - what does the speed variable do ? )
  • Set button A & B to reverse the direction of thr spinner. This is hard so a hint,

At the moment we spin by adding 1 to the pos variable.

We need to either add or remove 1 to the pos variable.

Depending on which way we are spinning,

      • we need to set variable pos to 0 if its biggr than the lenght of the spinner array ( if we spin forward )
      • we need to set variable pos to the size of the spinner array if its at the start of the array ( if we spin backward )