C# Class Porrey.Uwp.IoT.Sensors.Mcp3008

Defines an interface to the MCP3008 ADC via the SPI interface.
Inheritance: Spi, IMcp3008
Datei anzeigen Open project: porrey/iot

Public Methods

Method Description
Mcp3008 ( Windows.Devices.Spi.SpiConnectionSettings settings ) : System

Initializes a new instance of the Windows.Devices.Sensors.Mcp3008 with the specified SpiConnectionSettings.

Mcp3008 ( int chipSelectLine ) : System

Initializes a new instance of the Windows.Devices.Sensors.Mcp3008 with the specified Chip Select Line (0 or 1).

Read ( IChannel channel ) : Mcp3008Reading

Reads an integer value from the specified port. The value of the port can be a number from0 to 7.

Method Details

Mcp3008() public method

Initializes a new instance of the Windows.Devices.Sensors.Mcp3008 with the specified SpiConnectionSettings.
public Mcp3008 ( Windows.Devices.Spi.SpiConnectionSettings settings ) : System
settings Windows.Devices.Spi.SpiConnectionSettings An instance of SpiConnectionSettings that specifies /// the parameters of the SPI connection for the MCP3008.
return System

Mcp3008() public method

Initializes a new instance of the Windows.Devices.Sensors.Mcp3008 with the specified Chip Select Line (0 or 1).
public Mcp3008 ( int chipSelectLine ) : System
chipSelectLine int The Chip Select Line the MCP3008 /// is physically connected to. This value is either 0 or 1 on the /// Raspberry Pi 2.
return System

Read() public method

Reads an integer value from the specified port. The value of the port can be a number from0 to 7.
public Read ( IChannel channel ) : Mcp3008Reading
channel IChannel
return Mcp3008Reading