"It’s Here! The BFCM Sale of the Year – Grab Your Favorites!"

micro:bit Mine Clearance Alarm

Hello, let’s try the compass on the micro:bit today! A digital compass is an input sensor that detects magnetic fields. Your BBC micro:bit has an inbuilt compass that can detect the direction in which it is facing. I am going to make a mine clearance alarm project today.

Firstly let’s have a look at where the compass stays on the micro:bit:

Shot the Bul eye

Actually, the compass could be regarded as a module to measure the magnetic field strength in various directions. The magnetic field strength can be understood as the attractive force of the magnets we usually play with. And of course, it could tell us the directions. Now let’s try our gameplay today.

Shot the Bul eye

Detect if there is any magnetic hidden somewhere, if yes, program to display a sad face or display a happy face.

Materials required:

 

Shot the Bul eye

Firstly, judge the magnitude of the magnetic field, if it is bigger than a certain value, execute the program in the module. Here I set the value to 400. You could change this value to adapt the sensitivity of the measurement.

Shot the Bul eye

Here judge if the magnitude is over 400. If yes, set to display a sad face; or with a happy one.

Shot the Bul eye

You can try hiding the magnet and use our micro:bit to easily find the position of the magnet!

If you have any ideas or opinions, please feel free to contact us via [email protected].

Leave a Reply

images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
images
Children’s Programming Education is the Future Trend
images
Technical verification! Nezha series products can complete WRO competition tasks
images
Let's take part in the Ceremony of the New Factory of ELECFREAKS together!
images
Bluetooth Bee(HC-05 and HC-06) User Guide
images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
Monthly Archive