Esempio n. 1
0
        private async Task CloseDoorAsync()
        {
            Cts = new CancellationTokenSource();

            await LogMessageAsync("Closing Door...");

            await Uln2003Driver.TurnAsync(90, TurnDirection.Right, Cts.Token);

            Status = DoorStatus.Closed;
            await LogMessageAsync("Door is Closed.");
        }
Esempio n. 2
0
        private async Task OpenDoorAsync()
        {
            Cts = new CancellationTokenSource();

            await LogMessageAsync("Opening Door...");

            await Uln2003Driver.TurnAsync(90, TurnDirection.Left, Cts.Token);

            Status = DoorStatus.Open;
            await LogMessageAsync("Door is Open.");
        }