Micro:Bit Compass DIY
How to code a Micro:Bit compass.
Click this LINK or go to https://makecode.microbit.org/
Block Coding Part 1
Copy the block layout above.
Block Coding Part 2
Add the code above to previous code in "forever" block. Use compass for reference (if unable to see compass headings).
Finishing Block Coding
Once finish your code should look like this. Test your code using the simulator.
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.
Have Fun!!!
Don't forget to calibrate your compass!