internal TemperatureAndHumiditySensor(IGrovePi device, Pin pin, Model model)
 {
     if (device == null) throw new ArgumentNullException(nameof(device));
     _device = device;
     _pin = pin;
     _model = model;
 }
Exemplo n.º 2
0
 internal Sensor(IGrovePi device, Pin pin)
 {
     if (device == null)
     {
         throw new ArgumentNullException(nameof(device));
     }
     Device = device;
     Pin    = pin;
 }
Exemplo n.º 3
0
 internal TemperatureSensor(IGrovePi device, Pin pin)
 {
     if (device == null)
     {
         throw new ArgumentNullException(nameof(device));
     }
     _device = device;
     _pin    = pin;
 }
Exemplo n.º 4
0
 internal Sensor(IGrovePi device, Pin pin, PinMode pinMode)
 {
     if (device == null)
     {
         throw new ArgumentNullException(nameof(device));
     }
     device.PinMode(Pin, pinMode);
     Device = device;
     Pin    = pin;
 }
Exemplo n.º 5
0
 internal TemperatureAndHumiditySensor(IGrovePi device, Pin pin, Model model)
 {
     if (device == null)
     {
         throw new ArgumentNullException(nameof(device));
     }
     _device = device;
     _pin    = pin;
     _model  = model;
 }
Exemplo n.º 6
0
        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());
        }
Exemplo n.º 7
0
 internal Led(IGrovePi device, Pin pin) : base(device, pin, PinMode.Output)
 {
 }
Exemplo n.º 8
0
 public SoundSensor(IGrovePi device, Pin pin) : base(device, pin, PinMode.Input)
 {
 }
Exemplo n.º 9
0
 public Relay(IGrovePi device, Pin pin) : base(device, pin, PinMode.Output)
 {
 }
Exemplo n.º 10
0
 public WaterAtomizer(IGrovePi device, Pin pin) : base(device, pin, PinMode.Output)
 {
 }
 internal ButtonSensor(IGrovePi device, Pin pin) : base(device, pin, PinMode.Input)
 {
 }