Microbit Magnet

Introduction: Microbit Magnet

About: I am 7th grader. I like to design something especially 3D model. I like to design something with tinkercad. I am hoping to join the contest and win the prize and buy 3D printer.

In the magnet challenge, I made a challenge using Micro:bit that behaved differently when a magnet is near the Micro:bit. The Micro:bit showed different images when I press the buttons in the Micro:bit.

Supplies:

For this activity, I used supplies as following:

Micro:bit Battery holder + 2x AAA Batteries

1x Magnet

1x USB Cable (To upload the code)

Also, I used Microsoft Makecode Software. Here is the link: https://makecode.microbit.org/#

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Program Using Makecode Software

First, I opened the Makecode software. This is the page when

I created new project. Do not forget to rename the project.

There are two choices for coding in Makecode, which are blocks and JavaScript. I chose block because it is easier to use.

Step 2: Program the Micro:bit

Here was my code. You could change the image as you desire.

I downloaded the code by clicking the download button and I connected the Micro:bit to the computer by plugging the USB Cable to the computer. Then, I copied the file that I downloaded previously into the Micro:bit.

Step 3: Test the Code

To test the code, I unplugged the USB cable from the computer.

For Micro:bit to standalone, I plugged in battery holder with the battery inside it.

Usually, the Micro:bit needs compass calibration. Tilt the Micro:bit to fill the screen. After that, test the code. When I pressed button "A" (the left button), and the magnet was far, it showed a cow image. While I pressed button "A" (the left button), and the magnet was near, it showed a giraffe image.

When I pressed button "B" (the right button), and the magnet was far, it showed a duck image. While I pressed button "B" (the right button), and the magnet was near, it showed a target image.

That is my entire project for magnet challenge. I hope you like it. Thank you very much for reading my instruction and do not forget, "Please vote for me".

Many thanks to BBC Micro:bit and Makecode.

Be the First to Share

    Recommendations

    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest
    • Fix It Contest

      Fix It Contest

    8 Discussions

    0
    dewigunawanoei
    dewigunawanoei

    20 days ago

    How exciting to see that magnet can make different behavior for microbit. Two thumbs up! :)

    0
    Mulia Wi
    Mulia Wi

    24 days ago

    Awesome job!

    0
    Penolopy Bulnick
    Penolopy Bulnick

    25 days ago

    That's an interesting idea! Thanks for sharing :)