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](https://content.instructables.com/F2X/UGUR/KHJ4PBPR/F2XUGURKHJ4PBPR.jpg?auto=webp&crop=1240%2C600&frame=1&width=320)
Participated in the
Block Code Contest