This is a simple game for the microbit V2. The game is a tug of war game where the player has to press the A or B button as fast as possible to win the game. The game is written in Rust and uses the microbit V2 hardware.
IMG_8917.MOV
Connect microbit v2 to your computer and run just flash
or cargo embed --target thumbv7em-none-eabihf --release
.
- Two players, one uses button A and the other uses button B.
- Press both A and B buttons at the same time to get ready.
- After the countdown's over, players have to press button A or B as fast as possible.
- The dot will run clockwise if B is pressed faster, and counter-clockwise if A is pressed faster.
- When the dot reaches the center, one of the player wins.
- Press both A and B buttons at the same time to get ready for another round.
- RTC interrupt for the game loop and LED updates
- GPIOTE interrupt for the button presses
- PWM + DMA interrupt for sound playback