Cindy
Created January 31, 2020 © Apache-2.0

Ada Watch

Ada Watch is IoT watch with BBC microbit on Ada language

BeginnerFull instructions provided20 hours60
Ada Watch

Things used in this project

Story

Read more

Code

main.adb

ADA
main.adb
------------------------------------------------------------------------------
-- Ada Watch
------------------------------------------------------------------------
with Ada.Real_Time;use Ada.Real_Time;
with Display;

procedure Main is
   type My_time is range 0 .. 59;
   my_second : My_time := 0;
   my_minutes : My_time := 0;
   type My_hours is range 0 .. 23;
   my_hour : My_hours := 0;
   txt : String :=" ";
   sep : String :=":";
   D     : Time_Span := Seconds (1);
   Next  : Time      := Clock + D;
begin
   loop
      for my_hour in 1 .. 24 loop
         for my_minutes in 1 .. 60 loop
            --Delays(60);
            for my_second in 1 .. 60 loop
               -- my_second :=K;
               delay until Next;
               -- txt :=My_time'Image(my_second);
               Display.Scroll_Text (my_minutes'Img & sep & my_second'Img) & sep & my_hour'Img);
            end loop;
            -- my_minutes := J;
         end loop;
         -- my_hour :=I;                   
      end loop;
      --Display.Scroll_Text (txt);
   end loop;
end Main;

Credits

Cindy

Cindy

5 projects • 3 followers
bonjour

Comments