AnalogInputPin Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Driver for analog input pins
public abstract class AnalogInputPin : IDisposable
type AnalogInputPin = class
interface IDisposable
Public MustInherit Class AnalogInputPin
Implements IDisposable
- Inheritance
-
AnalogInputPin
- Implements
Constructors
| Name | Description |
|---|---|
| AnalogInputPin(AnalogController, Int32, ElectricPotential) |
Construct an instance of an analog pin. This is not usually called directly. Use OpenPin(Int32) instead. |
Properties
| Name | Description |
|---|---|
| AdcResolutionBits |
Resolution of the Analog-to-Digital converter in bits. If the ADC supports negative values, the sign bit is also counted. |
| Controller |
Reference to the controller for this pin |
| MaxVoltage |
The largest measurable voltage. |
| MinVoltage |
The minimum measurable voltage. May be negative. |
| PinNumber |
The logical pin number of this instance. |
| VoltageReference |
The reference voltage level to convert raw values into voltages. Some boards (i.e. the ADS111x series) always return an absolute voltage. Then this value is meaningless. |
Methods
| Name | Description |
|---|---|
| ConvertToVoltage(UInt32) |
Converts an input raw value to a voltage |
| DisableAnalogValueChangedEvent() |
Disables the event callback |
| Dispose() |
Dispose this instance |
| Dispose(Boolean) |
Dispose this instance |
| EnableAnalogValueChangedEvent(GpioController, Int32) |
Enable event callback when the value of this pin changes. |
| FireValueChanged(ValueChangedEventArgs) |
Fires a value changed event. |
| ReadRaw() |
Read a raw value from the pin |
| ReadVoltage() |
Read a raw value and convert it to a voltage |
Events
| Name | Description |
|---|---|
| ValueChanged |
Fires when a value is changed for which a trigger is registered |