microbit fidget spinner
fidget spinner.doc
Code
Code
We looked at two ways to create a microbit fidget spinner using
- Javablocks ( page 1 and 3 )
- micro python ( page 2 and 4 )
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
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 )