C# Class CyrusBuilt.MonoPi.Gertboard.GertboardDevice

Provides read/write access to the MCP4802 Analog-to-Digital converter via SPI on the Gertboard. This wraps the Gertboard support found in wiringPi (https://github.com/WiringPi/WiringPi).
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
AnalogRead ( GertboardAdcChannels channel ) : Int32

Reads an analog value from the ADC on the Gertboard.

AnalogWrite ( GertboardAdcChannels channel, Int32 value ) : void

Writes an 8-bit data value to ADC on the Gertboard.

Initialize ( ) : System.Boolean

Initializes SPI communication with the device.

Method Details

AnalogRead() public static method

Reads an analog value from the ADC on the Gertboard.
/// Not yet initialized. Call before use. ///
public static AnalogRead ( GertboardAdcChannels channel ) : Int32
channel GertboardAdcChannels /// The channel to read from. ///
return System.Int32

AnalogWrite() public static method

Writes an 8-bit data value to ADC on the Gertboard.
/// Not yet initialized. Call before use. ///
public static AnalogWrite ( GertboardAdcChannels channel, Int32 value ) : void
channel GertboardAdcChannels /// The channel to write to. ///
value System.Int32 /// The value to write. ///
return void

Initialize() public static method

Initializes SPI communication with the device.
public static Initialize ( ) : System.Boolean
return System.Boolean