Real Life Mario Block

by lebiosphere56 in Circuits > Microcontrollers

416 Views, 1 Favorites, 0 Comments

Real Life Mario Block

F7EKMXYKUE3EV4B.png

Me and my students (9th grade) are transforming our middle school corridor into a real life Mario Bros Parkour thanks to radio connected Micro:bits.

Supplies

Capture d’écran 2021-10-05 224926.png
Capture d’écran 2021-10-05 225105.png
Capture d’écran 2021-10-05 225334.png
Capture d’écran 2021-10-05 225319.png

For each light block, you will need :

  • A cube of your choice,
  • A Micro:bit
  • A Micro:bit Grove Sheild
  • A Grove LED strip

Micro:bit to PC

Capture d’écran 2021-10-05 230038.png

Plug your first Micro:bit to your PC with the USB connector.

Vittascience

vittascience-logo.png
microsoft-makecode.png
extension.PNG

In France, we use the Vittascience web interface to program Micro:bit. On Vittascience, all the libraries are already installed.


If you use Microsoft MakeCode instead, you must add the "Neopixel" library.

  1. Select "+Extension" (1) in the vertical functions list.
  2. Then select "Neopixel" (2)

Now, you can code.

Capture d’écran 2021-10-06 150301.png
makecode_version.PNG

Upload that code into your first Micro:bit by pressing "Télécharger"

You can go to the link to find the source on :

https://fr.vittascience.com/microbit/?link=615cbe84639f9&mode=blocks&simu=1

The algorithm is simple :

  1. Initialise radio channel
  2. Switch of the light.
  3. Wait for a signal to switch on the light ("A" pressed or "step1" radio message)
  4. Wait for checking to switch of the light and send the "step2" radio message to the next block.
  5. GOTO 3


If you prefer the MakeCode version, you'd better use this link :

https://makecode.microbit.org/_1Aw1Xeav2igV

Downloads

Plug the Light

grove10.jpg

Fit the Micro:bit into the Grove shield.

Plug the Neopixel strip to the P0 output.

Then plug the batteries

Put Every Thing in the Cube

Put your electronic stuff in the first block cube.

Then suspend it to the corridor ceiling.

Do It Again

Capture d’écran 2021-10-06 150349.png
step.PNG

From step 1 to step 5, do it again with the other blocks.

But you must change the radio messages in order to see your parkour enlight in the correct order.

  • For the second block, replace A by "step2" and B by "step3".
  • For the third block, replace A by "step3" and B by "step4".
  • For the fourth block, replace A by "step4" and B by "step5".

And so on.

Until the last block where you will replace B by "step1" in order to enlight the first block again.

Run

panneau-picto-texte-paysage-interdiction-de-courir-dans-les-escaliers-et-les-couloirs.jpg
Projet de Parkour Mario

Press the "A" button on the first block to start the game.

Now put a red cap, run in your middle school corridor and hurt the blocks as they enlight.