Caleb Leonard
Published © CERN-OHL2

Arrows for Micro:Bit

I coded more arrows for the Micro:Bit LED array for more expressions of directions. Uses include a game night spinner and electronic compass

BeginnerShowcase (no instructions)1 hour653
Arrows for Micro:Bit

Things used in this project

Story

Read more

Schematics

micro:bit electronics circuitry

The board used is the micro:bit V2

Code

Ada Arrows for micro:bit

ADA
The code gives a font to use cardinal and ordinal directional arrows. This can be used for electronic game spinners, electronic compasses, or even gps with additional hardware hacking.
with HAL;

package Arrows is

   type Glyph is array (0 .. 4) of HAL.UInt5;

   Font : constant array (0 .. 93) of Glyph :=
   
      (2#00100#, -- North Arrow
       2#01110#,
       2#00100#,
       2#00100#,
       2#00000#),
      
      (2#00000#, -- South Arrow
       2#00100#,
       2#00100#,
       2#01110#,
       2#00100#),
      
      (2#00000#, -- West Arrow
       2#01000#,
       2#11110#,
       2#01000#,
       2#00000#),
      
      (2#00000#, -- East Arrow
       2#00010#,
       2#01111#,
       2#00010#,
       2#00000#),

     
      (2#11100#, -- Northwest Arrow
       2#11000#,
       2#10100#,
       2#00010#,
       2#00000#),
      
      (2#00111#, -- Northeast Arrow
       2#00011#,
       2#00101#,
       2#01000#,
       2#00000#),
      
      (2#00000#, -- Southwest Arrow
       2#00010#,
       2#10100#,
       2#11000#,
       2#11100#),
      
      (2#00000#, -- Southeast Arrow
       2#01000#,
       2#00101#,
       2#00011#,
       2#00111#),
     
      (2#01000#, -- North-Northwest Arrow
       2#01000#,
       2#00100#,
       2#00100#,
       2#00000#),
      
      (2#00010#, -- North-Northeast Arrow
       2#00010#,
       2#00100#,
       2#00100#,
       2#00000#),
      
      (2#00000#, -- South-Southwest Arrow
       2#00100#,
       2#00100#,
       2#01000#,
       2#01000#),
      
      (2#00000#, -- South-Southeast Arrow
       2#00100#,
       2#00100#,
       2#00010#,
       2#00010#),
     
      (2#00000#, -- West-Northwest Arrow
       2#11000#,
       2#00110#,
       2#00000#,
       2#00000#),
      
      (2#00000#, -- East-Northeast Arrow
       2#00011#,
       2#00110#,
       2#00000#,
       2#00000#),
      
      (2#00000#, -- West-Southwest Arrow
       2#00000#,
       2#00110#,
       2#11000#,
       2#00000#),
      
      (2#00000#, -- East-Southeast Arrow
       2#00000#,
       2#01100#,
       2#00011#,
       2#00000#),

end Arrows;

Credits

Caleb Leonard

Caleb Leonard

1 project • 0 followers
Thanks to Ada Development Team.

Comments