Skip to content

Commit

Permalink
Improve test-microbit LED effect.
Browse files Browse the repository at this point in the history
  * test-microbit/lights.adb: adjust timings.
  • Loading branch information
simonjwright committed Jul 15, 2018
1 parent bf938e8 commit 8380998
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test-microbit/lights.adb
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ package body Lights is
type LED_Sequence is array (Positive range <>) of Coord_Pair;
Spiral_Clockwise : constant LED_Sequence :=
((1, 1, 1), (1, 2, 1), (1, 3, 1), (1, 4, 1), (1, 5, 1),
(2, 5, 2), (3, 5, 2), (4, 5, 2), (5, 5, 2),
(5, 4, 2), (5, 3, 2), (5, 2, 2), (5, 1, 2),
(4, 1, 3), (3, 1, 3), (2, 1, 3),
(2, 2, 3), (2, 3, 3), (2, 4, 3),
(3, 4, 4), (4, 4, 4),
(4, 3, 4), (4, 2, 4),
(3, 2, 5),
(3, 3, 6));
(2, 5, 1), (3, 5, 1), (4, 5, 1), (5, 5, 1),
(5, 4, 1), (5, 3, 1), (5, 2, 1), (5, 1, 1),
(4, 1, 1), (3, 1, 1), (2, 1, 1),
(2, 2, 2), (2, 3, 2), (2, 4, 2),
(3, 4, 2), (4, 4, 2),
(4, 3, 2), (4, 2, 2),
(3, 2, 3),
(3, 3, 4));

function Interval return Ada.Real_Time.Time_Span is
(case Buttons.Button_State (Buttons.A) is
when Buttons.Off => Ada.Real_Time.Milliseconds (100),
when Buttons.Off => Ada.Real_Time.Milliseconds (150),
when Buttons.On => Ada.Real_Time.Milliseconds (50));

use type Ada.Real_Time.Time;
Expand Down

0 comments on commit 8380998

Please sign in to comment.