Пример #1
0
 public IoTButton(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
     pin.SetActiveType(IoTActiveType.ActiveLow);
     IsPressed = false;
     tracer.Verbose("Initial value: " + IsPressed);
 }
Пример #2
0
 public IoTSensor(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
     pin.SetActiveType(IoTActiveType.ActiveLow);
     HasPresence = pin.Value;
     tracer.Verbose("Initial value: " + HasPresence);
 }