stamp.peripheral.sensor.temperature
Class  DS1620
java.lang.Object
  |
  +--stamp.peripheral.sensor.temperature.TempSensor
        |
        +--stamp.peripheral.sensor.temperature.DS1620
- public class DS1620
- extends TempSensor
  
This class encapsulates the basic capabilities of the Dallas DS1620 3-wire
 temperature sensor.
 
| 
Constructor Summary | 
DS1620(int dataPin,
       int clockPin,
       int enablePin)
 
          Creates DS1620 temperature sensor object that is intialized for
 free-run mode for use with a CPU. | 
 
| 
Method Summary | 
 int | 
getTempC()
 
          Returns the current temperature in degrees Celsius. | 
 int | 
getTempF()
 
          Returns the current temperature in degrees Farenheit. | 
 int | 
getTempRaw()
 
          Returns DS1620 temp in units of 0.5 degrees Celcius | 
 
| Methods inherited from class stamp.peripheral.sensor.temperature.TempSensor | 
CelsiusToFahr, 
FahrToCelsius, 
getTemp, 
getTempHi, 
getTempLo, 
setTempHi, 
setTempLo, 
tempHi, 
tempLo, 
tempOk, 
tempStatus | 
 
 
DS1620
public DS1620(int dataPin,
              int clockPin,
              int enablePin)
- Creates DS1620 temperature sensor object that is intialized for
 free-run mode for use with a CPU.
- Parameters:
 dataPin - DS1620 DQ pin (bi-directional)clockPin - DS1620 clock inputenablePin - DS1620 RST| input (high to enable)
 
 
getTempRaw
public int getTempRaw()
- Returns DS1620 temp in units of 0.5 degrees Celcius
- Overrides:
 - getTempRaw in class TempSensor
 
 
- Returns:
 - Temperature in half degrees Celcius.
 
 
 
getTempC
public int getTempC()
- Returns the current temperature in degrees Celsius.
- Overrides:
 - getTempC in class TempSensor
 
 
- Returns:
 - Temperature in whole degrees Celsius.
 
 
 
getTempF
public int getTempF()
- Returns the current temperature in degrees Farenheit.
- Overrides:
 - getTempF in class TempSensor
 
 
- Returns:
 - Temperature in whole degrees Farenheit.