public UltraSonicSensor(Connectors triggerPin, Connectors echoPin)
 {
     trigger = new IoTPin(triggerPin);
     trigger.SetDirection(IoTPinDirection.DirectionOutInitiallyLow);
     echo = new IoTPin(echoPin);
     echo.SetDirection(IoTPinDirection.DirectionIn);
 }
示例#2
0
 public Button(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
     IsPressed = false;
     tracer.Verbose("Initial value: " + IsPressed);
 }
示例#3
0
 public ProximitySensor(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
     HasPresence = pin.Value;
     tracer.Verbose("Initial value: " + HasPresence);
 }
 public IoTSensor(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
     pin.SetActiveType(IoTActiveType.ActiveLow);
     HasPresence = pin.Value;
     tracer.Verbose("Initial value: " + HasPresence);
 }
        public RotaryEncoder3(Connectors pinA, Connectors pinB)
        {
            this.pinA = new IoTPin(pinA);
            this.pinA.SetDirection(IoTPinDirection.DirectionIn);

            this.pinB = new IoTPin(pinB);
            this.pinB.SetDirection(IoTPinDirection.DirectionIn);
        }
示例#6
0
 public Relay(params Connectors [] gpio)
 {
     pins = new IoTPin [gpio.Length];
     for (int i = 0; i < gpio.Length; i++)
     {
         pins [i] = new IoTPin(gpio [i]);
         pins [i].SetDirection(IoTPinDirection.DirectionOutInitiallyLow);
     }
 }
示例#7
0
 public ServoMotor(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionOutInitiallyLow);
 }
 public RfReceiver(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
 }
 public IoTRfReceiver(Connectors gpio)
 {
     pin = new IoTPin(gpio);
     pin.SetDirection(IoTPinDirection.DirectionIn);
     pin.SetActiveType(IoTActiveType.ActiveLow);
 }
示例#10
0
 public LightSensor(Connectors gpio)
 {
     pin = new IoTPin(gpio);
 }