Click or drag to resize
Switch Class
An implementation of the ISwitch interface that uses a single GPIO pin.
Inheritance Hierarchy
SystemObject
  Microsoft.IoT.Devices.InputSwitch

Namespace: Microsoft.IoT.Devices.Input
Assembly: Microsoft.IoT.Devices (in Microsoft.IoT.Devices.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public sealed class Switch : ISwitch, 
	IDevice, IClosable, IStringable

The Switch type exposes the following members.

Constructors
  NameDescription
Public methodSwitch
Initializes a new Switch instance.
Top
Properties
  NameDescription
Public propertyDebounceTimeout
Gets or sets the amount of time in milliseconds that will be used to debounce the switch.
Public propertyIsOn
Gets a value that indicates if the switch is on.
Public propertyOnValue
Gets or sets the GpioPinValue that indicates the switch is on.
Public propertyPin
Gets or sets the pin that the switch is connected to.
Public propertyUsePullResistors
Gets or sets a value that indicates if integrated pull up or pull down resistors should be used to help maintain the state of the pin.
Top
Methods
  NameDescription
Public methodClose
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Events
  NameDescription
Public eventSwitched
Occurs when the switch is switched.
Top
See Also