Things used in this project

Hardware components:
Microbitheart
BBC micro:bit board
×1
Compact Disc
×1
61vhxtmzbyl
AA Batteries
×1
11026 02
Jumper wires (generic)
×1

Code

Micro:bit Top Revolution CounterJava
This code was originally created as a block based coding, that was converted to java code. This code is used to count and display the number of spins a top does.
let Spin = 0
input.onButtonPressed(Button.A, () => {
    Spin = 0
    basic.forever(() => {
        if (input.rotation(Rotation.Roll) > 360) {
            basic.showNumber(Spin + 1)
        }
    })
})

Credits

1be569eed2ea889261cf76bcc0e5770e
Ikaika Stone
1 project • 0 followers
Contact
8a72f446557d06c3ed20362b87367cb6
Douglas Kiang
5 projects • 3 followers
Teacher, dad, reformed skydiver, friend to dogs, food truck aficionado.
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / LoginAbout BBC micro:bit