Smart Technology

Form 3 - ECA

2024-2025

Floor 4 - Computer Room

Mr. Peter

Outline

Outline

What is Compass

1

The principal of compass

2

Exercises

1. Show the compass heading number on your Microbit

2. Sounds while it points to North

3. Points to the North with arrow icon

4. Temperature sensor

4

Compass in Microbit

3

Let's learn Microbit

What is Compass

How compass works

Compass in Microbit

Compass in Microbit

Ex05_01 - Show compass heading on physic Microbit

Show compass heading number every 0.5 second

name it as 01_YourName_Ex05_1.hex

Download it

Ex05_01 - Show compass heading on physic Microbit

Ex01 - Show compass heading on physic Microbit

Calibrating the micro:bit compass

Ex05_2 - Ring tone while it points to North

Check if the compass heading is greater than 355 or less than 5.

1

Ring tone if it points to North direciton.

2

Mute if it doesn't point in the North direction.

3

Ex05_2 - Ring tone while it points to North

name it as 01_YourName_Ex05_2.hex

Download it

Ex05_2 - Ring tone while it points to North

Ex05_3 - Points to the North with arrow icon

Ex05_3 - Points to the North with arrow icon

Check which direction the compass is pointing to.

1

Show the corresponding arrow icon after determining the direction.

1

name it as 01_YourName_Ex05_3.hex

Download it

Ex05_3 - Points to the North with arrow icon

Temperature sensor in Microbit

Temperature sensor

Try to get the temperature of the environment.

Changing the display temperature unit

Formula:

Fahrenheit = Celsiu\ degree \cdot \frac{9}{5} \ + \ 32

Display the transformed value using show number code block.

2

Transform the temperature value to Fahrenheit.

1

name it as 01_YourName_Ex05_4.hex

Download it

Ex05_4 - Points to the North with arrow icon

Smart Technology - Lesson05

By Mr Peter

Smart Technology - Lesson05

  • 188