public class TiDS18B20 extends Object
Constructor and Description |
---|
TiDS18B20(TiOWMaster ow,
int ioID)
TiDS18B20 initialization
|
Modifier and Type | Method and Description |
---|---|
TiDS18B20ROM[] |
enumeration()
Device enumeration, maximum support 8
|
int |
getResolution()
Gets the current resolution
|
double |
getTemperature()
Gets the temperature
|
void |
measure()
Startup temperature measurement
|
void |
select(TiDS18B20ROM rom)
Select the device with ROM object
|
void |
selectSingle()
Select a device without ROM object
|
void |
setResolution(int bits)
Set the resolution
|
public TiDS18B20(TiOWMaster ow, int ioID) throws IOException
ow
- TiOWMaster object[IN]ioID
- TiOWMaster io id[IN]IOException
public TiDS18B20ROM[] enumeration() throws IOException
IOException
public int getResolution()
public double getTemperature() throws IOException
IOException
public void measure() throws IOException
IOException
public void select(TiDS18B20ROM rom)
rom
- device ROM object[IN]public void selectSingle()
public void setResolution(int bits) throws IOException
bits
- the resolution bit number, 9/10/11/12IOException