private async Task SetupHat() { grove = DeviceFactory.Build.GrovePi(); grove.PinMode(led, PinMode.Output); grove.PinMode(buzzer, PinMode.Output); grove.PinMode(butt, PinMode.Input); dht = DeviceFactory.Build.DHTTemperatureAndHumiditySensor(Pin.DigitalPin7, GrovePi.Sensors.DHTModel.Dht11); lbl.Text = "Ready! 1.0.1"; //hat = await SenseHatFactory.GetSenseHat() // .Configure // .ConfigureAwait(false); //hat.Display.Fill(Colors.Azure); //hat.Display.Update(); await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => timer.Start()); }
internal Sensor(IGrovePi device, Pin pin, PinMode pinMode) { if (device == null) { throw new ArgumentNullException(nameof(device)); } device.PinMode(Pin, pinMode); Device = device; Pin = pin; }