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);
 }
예제 #8
0
 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);
 }