Micro:Bit Compass DIY

Introduction: Micro:Bit Compass DIY

How to code a Micro:Bit compass.

Step 1:

Click this LINK or go to https://makecode.microbit.org/

Step 2: Block Coding Part 1

Copy the block layout above.

Step 3: Block Coding Part 2

Add the code above to previous code in "forever" block. Use compass for reference (if unable to see compass headings).

Step 4: Finishing Block Coding

Once finish your code should look like this. Test your code using the simulator.

Step 5: Flashing Code to Micro:Bit

Next plug in your Micro:Bit (via the include micro usb cable). Then find the download button and click the three dots on the right side. Click pair device and follow the provided instructions.

Step 6: Have Fun!!!

Don't forget to calibrate your compass!

Block Code Contest

Participated in the
Block Code Contest

Be the First to Share


    • Reclaimed Materials Contest

      Reclaimed Materials Contest
    • Hide It Challenge

      Hide It Challenge
    • Cookie Speed Challenge

      Cookie Speed Challenge