9. Case 06: Compass¶
9.1. Purpose¶
Use the Smart Coding Kit to create a wearable compass.
9.2. Products Link¶
9.3. Software¶
9.4. Programming¶
Save the returned value of the compass direction as varible i and judge it, if i<45 or i>315, display “N”; if i<135, display “E”; if i<225, display “S”, or display “W”.
9.5. Result¶
The current direction displays on the micro:bit.