C# Класс CyrusBuilt.MonoPi.Sensors.DS1620

This is a simple driver class for the Dallas Semiconductor DS1620 digital thermometer IC.
Наследование: IDS1620
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DS1620 ( IGpio clock, IGpio data, IGpio reset ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Sensors.DS1620 class with the clock, data, and reset GPIO pins.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Sensors.DS1620 object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Sensors.DS1620. The Dispose method leaves the CyrusBuilt.MonoPi.Sensors.DS1620 in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Sensors.DS1620 so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Sensors.DS1620 was occupying.

GetTemperature ( ) : Double

Sends the commands to get the temperature from the sensor.

Приватные методы

Метод Описание
ReadData ( ) : Int32

Reads 8-bit data from the DS1620.

SendCommand ( Int32 command ) : void

Sends an 8-bit command to the DS1620.

Описание методов

DS1620() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Sensors.DS1620 class with the clock, data, and reset GPIO pins.
public DS1620 ( IGpio clock, IGpio data, IGpio reset ) : System
clock IGpio /// The clock pin. ///
data IGpio /// The data pin. ///
reset IGpio /// The reset pin. ///
Результат System

Dispose() публичный Метод

Releases all resource used by the CyrusBuilt.MonoPi.Sensors.DS1620 object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Sensors.DS1620. The Dispose method leaves the CyrusBuilt.MonoPi.Sensors.DS1620 in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Sensors.DS1620 so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Sensors.DS1620 was occupying.
public Dispose ( ) : void
Результат void

GetTemperature() публичный Метод

Sends the commands to get the temperature from the sensor.
/// This instance has been disposed and is no longer usable. ///
public GetTemperature ( ) : Double
Результат Double