Which way is North? Well, a compass can tell you. And the BBC micro:bit has a little one right here:
It's actually more like a magnet sensor. The Earth has a magnetic field that you can use to find North. However, anything else with a magnetic field will also be seen by the compass and can throw off the readings. Lot's of electrical devices generate magnetic fields, so you want to be sure and be away from them if you want to find out where North is.